Try signing with a different account. - Callback error
See original GitHub issueDescribe the bug When trying to sign in to GitHub it says “Try signing with a different account.”
Steps to reproduce
- Clone orangopus/libby
- click “Login”
- Click “Sign in with GitHub”
Make sure to include the client ID and secret in .env as GITHUB_ID and GITHUB_SECRET
Expected behavior I expected it to login and return to the app.
Screenshots or error logs
The error is

Feedback Documentation refers to searching through online documentation, code comments and issue history. The example project refers to next-auth-example.
- Found the documentation helpful
- Found documentation but was incomplete
- Could not find relevant documentation
- Found the example project helpful
- Did not find the example project helpful
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:34 (10 by maintainers)
Top Results From Across the Web
Try signing with a different account. - Callback error #3830
Describe the bug When trying to sign in to GitHub it says "Try signing with a different account." Steps to reproduce Clone orangopus/libby ......
Read more >next-auth with googleProvider returns error: TIMED OUT // Try ...
it prints "Try signing in with a different account." in the browser; it returns error message like below in server. >>>> redirect callback...
Read more >Next-Auth, Prisma, Keycloak Error: "Try signing in with a ...
Keycloak server v20.0.1 returns a not-before-policy flag with value 0 in the OAuth2 callback after successful sign in.
Read more >Errors - NextAuth.js
This error can occur when a user tries to sign in via an email link; for example, if the email token could not...
Read more >Google oauth2.0 callback uri errors : r/reactjs - Reddit
... to `https://baseurl.com/api/auth/signin?error=OAuthCallback` and on screen it just says, "Try signing in with a different account.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey william, thanks for this!
You probably saw it, but theres an issue/PR related to this in the core repo already as well: https://github.com/nextauthjs/next-auth/pull/2108 + https://github.com/nextauthjs/adapters/issues/130
Balazs initially said he wanted to hold off on this change until the next major release since it seems like a breaking change. Some users will have already coded around it expecting it to be a number instead of a string, etc.
How do you see it? Would this be a breaking change in your opinion?
EDIT: Someone posted a workaround in that thread:
This is the code for a reproducible example @williamluke4
NOTE: The github oAuth on vercel preview deployment won’t work since I have not added the github and my database environment variables in the vercel environment, but you can add your own environment variables for testing. Please let me know if I should add them.
Steps I took to setup nextauthjs in this project:
ran
yarn add next-authFollowed the steps in this guide to install next-auth/prisma-adapter@canary
added
database: process.env.DATABASE_URLin[...nextauth].jsfileThis is how my github OAuth application registration looks like
added GITHUB_ID, GITHUB_SECRET, DATABASE_URL environment variables in .env.local
import { signOut, useSession } from 'next-auth/client'used insrc/components/Navbar/index.tsxfor checking session usage.import { signIn } from 'next-auth/client'used insrc/components/Auth/OAuthProviders.tsxfor signing in.After doing all this, I start the next server using
yarn devthen, go to
http://localhost:3000/login, then click on github, that redirects me tohttp://localhost:3000/api/auth/signinthen I click on Sign in with Github, login with my github credentials and then I get this error:
In the nextjs server console, I get the following error
Thankyou @williamluke4 for helping out 😃