Thanks again for your answer @dan ,
Are you passing a scope parameter to FusionAuth?
Not I'm not passing any scope, because the endpoint I'm using doesn't accept one: https://fusionauth.io/docs/v1/tech/apis/identity-providers/google#complete-the-google-login
Are you saying that I must first have a flow through the oauth2/authorize
endpoint?
From what I understand from the doc of the complete-the-google-login it isn't necessary, I should be able to use that endpoint to create a user
For example, if you built your own login page, you could add a Login with Google button and complete the Google authentication. When you complete the Google authentication you will have been returned an id token from Google. Using this API you can pass that id token returned from Google to FusionAuth and we will complete the login workflow and reconcile the user to FusionAuth.
The user does not need to exist yet in FusionAuth to utilize this API.
So If my user doesn't exist yet in fusionauth, I can't have provided a scope before hand.
I'm starting to think I may misunderstand what this complete login endpoint objective is.
I'm building my own login page, and letting users auth themselves through google and then I silently register them to my fusionauth instance. User never hears about fusionauth. Does that scenario fits what /api/identity-provider/login offers ?