Skip to content
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

Using GoogleProvider prompts "Try signing in with a different account." #10709

Open
zhongzhuhua opened this issue Apr 24, 2024 · 0 comments
Open
Labels
bug Something isn't working legacy Refers to `next-auth` v4. Minimal maintenance. triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@zhongzhuhua
Copy link

Environment

  System:
    OS: macOS 13.0
    CPU: (8) arm64 Apple M1 Pro
    Memory: 65.66 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 21.7.1 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.5.0 - /opt/homebrew/bin/npm
    pnpm: 8.7.1 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 124.0.6367.62
    Safari: 16.1
  npmPackages:
    next: 13.3.0 => 13.3.0 
    next-auth: 4.24.7 => 4.24.7 
    react: 18.2.0 => 18.2.0 

Reproduction URL

https://github.com/HamedBahram/next-auth-demo

Describe the issue

In the above code repository, I modified my GoogleProvider configuration clientId and clientSecret for my own testing. My clientId has been used to log in successfully using Google's auth.
https://accounts.google.com/o/oauth2/v2/auth?&response_type=code&state=state_parameter_passthrough_value&client_id=408609215581-iknm7ovoar087pmc5ddpokq1eaha9dlp.apps.googleusercontent.com&redirect_uri=http://localhost:3000&scope=https://www.googleapis. com/auth/userinfo.profile
But if next-auth is used, the error code prompt of the callback is ?error=OAuthSignin, and the built-in page prompt of next-auth shows "Try signing in with a different account."

How to reproduce

npm run dev
click sign in
click Sign in with Google

Expected behavior

Login should jump to the callback address, and there is ?code=return. Now the callback address prompt is ?error=OAuthSignin

@zhongzhuhua zhongzhuhua added bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Apr 24, 2024
@ndom91 ndom91 added the legacy Refers to `next-auth` v4. Minimal maintenance. label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working legacy Refers to `next-auth` v4. Minimal maintenance. triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

2 participants