"grant type" missing for social login

Hello, I am new to Auth0. I am setting up authentication via passwordless email, phone and social login. I am creating APIs for the mobile devs and react devs.

I have setup the email and phone passwordless auth but when I am hitting oauth/token for the social login it is giving me error “Missing required parameter: grant_type”.

In the documentation it is not documented what grant type should I use for the social login. Parameters I am sending in the post request are: client_id, client_secret, access_token, connection

Please help

:wave: @vishal.agarwal :slight_smile:

For Social Login you will typically want to use Authorization Code Flow, and you can read more about how to use that here (particularly here, which provides guidance on how to implement).

Hope this helps :sunglasses:

1 Like

I am sorry I still did not understand how can I use it in my project API section. Documentation did not mention social login anywhere or what values I need from the frontend side (reactJs / react-native) to complete this.

:wave: @vishal.agarwal

So, if you haven’t already done so I’d recommend you check out Auth0 React SDK Quickstarts: Login :sunglasses: This SDK utilizes Authorization Code Flow and our tutorial will show you how to integrate your application with the Auth0 React SDK to perform login authentication utilising Auth0 Universal Login (which supports all manner of first-factor authentication methods out-of-the-box, including Social, via simple configuration).

The follow-on tutorial entitled Auth0 React SDK Quickstarts: Call an API will then show you how to configure to obtain an Access Token in order to call your API (for more information on Access Tokens and their use see the Auth0 documentation here).

Hope this helps :sunglasses:

1 Like

Hello, I tried this. React dev is giving me the access token after completing all the above steps but that access token is giving me unauthorized.

Is setting scope “openid profile email” and setting audience is required when generating access token?