Reputation: 30015
I am trying to use the following enpoint for social authentication with auth0.
https://YOUR_NAMESPACE/authorize
The documentation clearly states that given the response_type=token
we should recieve an access_token
and an id_token
in the hash fragment.
https://auth0.com/docs/api/authentication#!#get--authorize_social
But for whatever reason, I only get back the access_token
. The login seems to work fine, and authenticate with google, but when redirected to the callback, the id_token
is just missing. The access_token
, state
, and token_type
are present at-least.
I've attempted using the /oauth/access_token
endpoint to receive the id_token
given I already have the access_token
, but making that request (I've triple checked I'm doing it correctly) always yields a 401 unauthorized
.
Auth0 is clearly a worthwhile product, so I very much doubt its straight up not working. Can anyone point me in the right direction? Googling around has not been helpful so far.
Upvotes: 2
Views: 915
Reputation: 53928
I'm not sure where the docs say that response_type=token
would deliver both an access_token
and an id_token
in the fragment but the OAuth 2.0/OpenID Connect specifications themselves say that token
should return just an access_token
and instead the token id_token
response type would deliver both. I guess that's worth a try. Also make sure that you include the scope openid
in the authorization request.
Upvotes: 5