-
Notifications
You must be signed in to change notification settings - Fork 213
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 pass in nonce? #135
Comments
In the case of Google Sign-In for iOS and macOS, nonce values are being generated by AppAuth and included with the auth request. During ID token validation, the nonce value of the ID token is then verified using the originally generated value. |
@petea Oh interesting. How can I get the originally generated value? I also see that the comment says
Is there no way to explicitly set this value? |
The nonce generated by AppAuth isn't available via the Google Sign-In API surface. Currently, the recommended approach to server-side validation of the ID token doesn't include validation of the nonce.
AppAuth allows you to provide a specific nonce, if desired. However, Google Sign-In does not expose this capability in its API surface. |
@petea The lack of getting the raw nonce or specifying the raw nonce is blocking a few different users. Would a PR to fix this be welcome in the future? |
We need nonce support, too. |
@DanMossa, PRs are always welcome. Can you provide more detail on the specific use cases that are blocked here? Are they all related to server-side verification of the nonce? @toshi0383 is the existing automatic client-side nonce generation / validation not adequate for your needs? |
@petea We generate nonce in our server-side, so we need manual way to do this. |
Done! |
Hi all! Many apologies for the delay. Thanks for your patience. Would you be able to share more information about your use-case? It seems to deviate from the typical use case where the In general, it seems fine for GSI to provide an API to ingest a |
This is not true. The OIDC spec which Google follows explicitly states:
Please allow for people to be able to extract the nonce you send to Google. |
@petea @toshi0383 can u help me setting up nonce in the google sign in package? Its an urgent usecase |
@SunilKividor Hire someone and leave. |
@toshi0383 Thankyou for the response. We have moved to google credential management for setting up authentication with nonce. I appreciate your time. |
Any news on that? The only way to set the |
FYI my fork is an option too. #244 |
I have opened a PR to support this: #402 |
been a few months, any movement on this PR? |
Done here: #402 |
Context:
You can not pass a rawNonce to signInWithGoogle.
When using signInWithGoogle on Android, the returned idToken does not return a nonce. This makes sense because a rawNonce is not passed in.
The same exact code when run on iOS, returns a hashed nonce in the idToken. This does not make sense since we can not pass in a nonce. Where is the nonce coming from?
The text was updated successfully, but these errors were encountered: