Skip to content

Invalid error code have been thrown: kGIDSignInErrorCodeUnknown, but should be kGIDSignInErrorCodeCanceled #471

Closed

Description

@Romick2005

Describe the bug
If user cancel google signIn process at latest step (confirming two previous steps), the lib throws error with OIDErrorCodeProgramCanceledAuthorizationFlow that is handled as kGIDSignInErrorCodeUnknown, but it should be the same as OIDErrorCodeUserCanceledAuthorizationFlow has: kGIDSignInErrorCodeCanceled (The user canceled the sign-in flow.)

Related with react-native-google-signin

To Reproduce
Steps to reproduce the behavior:

  1. Go to login with Google
  2. Tap on 'Continue' (step 1)
  3. Select google account and press 'Continue' (step 2)
  4. On the last step select 'Cancel'.
  5. See 'Unknown error in google sign in. (kGIDSignInErrorCodeUnknown access_denied)' error, but it should be 'The user canceled the sign-in flow. (kGIDSignInErrorCodeCanceled)'

Expected behavior
Expected to see 'The user canceled the sign-in flow' error, not 'Unknown error in google sign in'.

Screenshots
image

Environment

  • Device: iPhone XS
  • OS: macOS Sonoma 14.5
  • Browser: Chrome

Additional context
Normal google sign in.

Activity

  1. added
    bugSomething isn't working
    triageIssues that need to be triaged
    on Sep 2, 2024
  2. added a commit that references this issue on Sep 2, 2024
  3. brnnmrls commented on Sep 9, 2024

    @brnnmrls
    Member

    Hello, thanks for reporting and issuing a fix! You're right – it seems there's a mismatch between the error codes. We'll get this reviewed and aim to include this fix in our next release.

  4. added a commit that references this issue on Oct 1, 2024
  5. removed
    triageIssues that need to be triaged
    on Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions