Uh oh!
There was an error while loading. Please reload this page.
Manual nonce generation option - #244
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
toshi0383
commented
Oct 27, 2022
@jsamol Could you sign the CLA? I cherry-picked your commit from this repository. |
jsamol
commented
Oct 27, 2022
@toshi0383 done |
theniceboy
commented
Jan 24, 2023
@toshi0383 Any updates on this? |
toshi0383
commented
Jan 25, 2023
Oh I should resolve conflict. Will do. Thanks for the heads-up! |
Conflicts: GoogleSignIn/Sources/GIDSignIn.m
toshi0383
commented
Jan 25, 2023
Fixed conflict. Confirmed that build succeeds. |
theniceboy
commented
Jan 25, 2023
Will this be unblocking the progress on implementing native sign in (#5)? Thanks! |
elliottetzkorn
commented
Apr 24, 2023
@toshi0383@petea any chance this could be prioritized? |
toshi0383
commented
Apr 25, 2023
@petea Any change merging this? |
elliottetzkorn
commented
Apr 29, 2023
@petea bump |
@toshi0383, @ch40w31 any chance someone can take a look? it's blocking supabase/supabase-flutter#5 |
toshi0383
commented
May 1, 2023
Please do not mention to me. I don't have permission to merge in this repository. |
elliottetzkorn
commented
May 5, 2023
@ch40w31 or @mdmathias would either of you be willing to review this? |
mdmathias
commented
Jun 1, 2023
Apologies for the delay and thanks for the PR! I added a comment to the issue with a request for a little more information. In principle, this change should be fine. |
| - (void)addScopes:(NSArray<NSString *> *)scopes | ||
| presentingViewController:(UIViewController *)presentingViewController | ||
| completion:(nullable GIDSignInCompletion)completion { | ||
| [GIDEMMSupport parametersWithParameters:options.extraParams | ||
| emmSupport:emmSupport | ||
| isPasscodeInfoRequired:NO]]; | ||
| [GIDEMMSupport parametersWithParameters:options.extraParams |
| additionalParameters[kSDKVersionLoggingParameter] = GIDVersion(); | ||
| additionalParameters[kEnvironmentLoggingParameter] = GIDEnvironment(); | ||
| NSString *codeVerifier = [OIDAuthorizationRequest generateCodeVerifier]; |
There was a problem hiding this comment.
This part is a little tricky for me because it looks like GSI is taking on some of the implementation details within AppAuth-iOS. IIUC, we have to create codeVerifier, codeChallenge, and the nonce because we don't have an initializer that we can easily call on OIDAuthorizationRequest that takes only the nonce.
Ideally, we would have an initializer on OIDAuthorizationRequest that only adds the nonce parameter to the simplest initializer. That way, we can keep these implementation details/default values inside AppAuth.
What do you think?
| @@ -674,10 +675,12 @@ - (void)testOAuthLogin_LoginHint { | |||
| } | |||
There was a problem hiding this comment.
I know that GIDSignInTest is cluttered and that GIDSignIn is a difficult class to test (we're working on this), but could you add a test that verifies the passed in nonce is matched in the OIDAuthorizationResponse we back in GIDSignIn?
It'd be great to have a unit test that asserts: XCTAssertEqualObjects(originalNonce, authorizationResponse.request.nonce).
elliottetzkorn
commented
Jun 1, 2023
@toshi0383 would you like to address these changes? I am also happy to contribute to this PR. |
toshi0383
commented
Jun 2, 2023
@elliottetzkorn Sounds great! I’ve been busy lately. |
ozasadnyy
commented
Jul 24, 2023
Hello @elliottetzkorn, did you have a change to take a look to this PR? |
Hey @elliottetzkorn, I'm on the Supabase Auth team and this fix would greatly improve the Sign in with Google experience in mobile apps while remaining as secure as the OIDC spec intends. I would kindly ask for an expedited review. cc @mdmathias |
singhalvipul53
commented
Sep 11, 2023
Hello, |
azlekov
commented
Sep 12, 2023
Asking the same! And is there any timeline where nonce support will be available? |
vonovak
commented
Sep 12, 2023
Hello, please be so kind and stop spamming the thread. Me (and others) subscribed to this thread to receive valuable updates, not questions such as "when is this going to happen" or "me too" - please be mindful of others and when asking a question, think about whether it really contributes something valuable to the discussion, thank you. To answer the question: this is open source. A feature will be available, when someone manages to open a PR which is reviewed and merged by the maintainers. That someone could be you, or someone else (could be me, if someone hires me). Until then, there are no updates. So please either wait or write the code yourself. |
…n ODIC flow (#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
…n ODIC flow (supabase#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
GhostWalker562
commented
Mar 29, 2024
Seems like custom nonce was released 3 weeks ago https://github.com/openid/AppAuth-iOS/releases/tag/1.7.0 , are we able to revisit this PR? |
Hello, However, I don't have a precise timeline for this. My estimate is that I will have time to do it in 2 months. If anyone wants to support me in prioritizing it, please consider sponsoring me on GH sponsors, or get in touch. I will edit this comment once I start working on it, so that there's no duplication of effort. |
SunilKividor
commented
Apr 13, 2024
can anyone help me adding the nonce parameter in the google sign in package . I really need to send a nonce in the parameter while signing in. I am ready to fork and make changes. |
vonovak
commented
Apr 28, 2024
I have opened a PR to support this: #402 |
AustinM23
commented
Jun 4, 2024
So when this PR will be merged? |
Aleks86
commented
Jun 20, 2024
Eagerly looking for merge! |
toshi0383
commented
Sep 13, 2024
…n ODIC flow (supabase#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
…n ODIC flow (supabase#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
…n ODIC flow (supabase#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
…n ODIC flow (#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
…n ODIC flow (supabase#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
…n ODIC flow (#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
Fixes: #135
Also partly fixes: #28