-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get Google provider ID token and not access token #393
Comments
Yeah Google is unusual and this has come up before, we should really cover this in the docs. tl;dr Google only returns a More info in #269 |
If I were to use |
You can try setting |
I did try exactly this as I saw it possible on the Okta provider, but 2 things happen:
The JWT callback is not reached in this case, only the signin callback
|
Thanks for trying that and reporting what you saw. I think at the moment the answer is this is not possible, but it seems like a reasonable feature request. |
Any update on this? The Google provider isn't really complete without it since most front ends will be calling services that need to verify a user's id_token. |
I need this too, thanks |
Yeah, any updates? I also really need this. |
So if I understand correctly, #837 would help here, right? Can anyone confirm this? (@vladfulgeanu @Dreched @MaryJJ @theapplefolks) It basically sends the |
I think #837 will help. To clarify, |
What ends up in your session is up to you. If you want the |
const getIdToken = async (refreshToken) => {
} |
@fedeberon so when using a refresh token, you will actually receive a new ID token as well? It never occurred to me, I'll check this out, thanks! Update: Hmm a quick search in the OIDC spec: https://openid.net/specs/openid-connect-core-1_0.html#RefreshTokenResponse It says
So getting an id_token is not given. 😔 |
🎉 This issue has been resolved in version 3.2.0-canary.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 3.3.0-canary.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
When using the Google provider I want to be able to authenticate with a backend server and for this I need to send the
ID token
to that API and get back the access token. Further info about this flow can be found here.This extra request I plan to do in the JWT callback, but in there I cannot access
ID token
. OnlyaccessToken
is given back intoken.account
.This is what I get in the JWT callback:
token (first argument):
profile (second argument):
The text was updated successfully, but these errors were encountered: