-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
bug: OAuthCallbackError: OAuth Provider returned an error #879
Comments
Make sure you're on beta.9, then remove the AUTH_URL env var, it is not needed and causes some issues still... |
yep I did. still getting the error. only get this error in development it seems. |
gonna need a different reproduction then since https://turbo.t3.gg works and signs you in properly.. |
right. works in production, but not in development for me. didn't realize when I first made the issue. sorry about that. |
still gonna need some more info cause repo works fine for me. what envs do you have (obv don't give me secrets), can you verify the version is beta.9 in pnpm-lock? cleared node_modules etc (run DB_HOST='aws.connect.psdb.cloud'
DB_NAME='personal'
DB_USERNAME=''
DB_PASSWORD='pscale_pw_'
AUTH_SECRET=""
AUTH_DISCORD_ID=""
AUTH_DISCORD_SECRET="" CleanShot.2024-02-08.at.22.32.41.mp4 |
also remove the proxy url if you have that set. not sure why that was in the example env in the first place as it's strictly to get preview envs working and not needed in dev 😅 |
On the Discord page does it error when you click the cancel button instead of authorize? login works, but the cancel errors on development for me. I already removed the proxy secret. |
https://www.loom.com/share/7d8d95668bc8422b99c9f28b45197ec2?sid=f68db43b-4004-45d3-83b0-0b3cc403ab1b fresh install with these envs. I should have done a video from the start like you did.
|
|
Cant see how that's related to the update. What database do you use? Planetscale is edge compat so it's only if you've changed the db provider |
I am using Planetscale. Same error here nextauthjs/next-auth#9869 |
Are you returning false in your signin? Then we can close this issue as the template doesnt do that and the issue is tracked upstream. |
I haven't changed any code other than adding my env vars. All I know is when I cancel the Discord sign-in flow in development, with edge set, I get the error with a fresh clone of this template. |
I see - let's keep it open then until it's fixed upstream (probably beta.10). I dont think there's anything wrong with our code here though |
I should also mention that my issue (nextauthjs/next-auth#9869) originated with t3 turbo but i reproduce it with a normal next app. Basically any time the auth flow is not successful for any reason on the edge runtime it throws a type error that I cannot catch/handle no matter what I try. Same behaviour but not on edge just redirects to the default error page of next auth or you cant catch/handle normally. Nothing much to do with t3 turbo. |
Related but different - why is Any thoughts? |
Provide environment information
System:
OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 5.78 GB / 9.72 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
pnpm: 9.0.0-alpha.1 - ~/.local/share/pnpm/pnpm
bun: 1.0.14 - ~/.local/share/pnpm/bun
Watchman: 2024.01.22.00 - /home/linuxbrew/.linuxbrew/bin/watchman
Describe the bug
nextauthjs/next-auth#9966
Link to reproduction
https://github.com/t3-oss/create-t3-turbo
To reproduce
click 'Sign in with Discord'. click the cancel button on the Discord signin page. see error.
Additional information
it should send back to something like https://turbo.t3.gg/api/auth/signin?error=OAuthCallbackError? instead it is this http://localhost:3000/api/auth/callback/discord?error=access_denied&error_description=The+resource+owner+or+authorization+server+denied+the+request
The text was updated successfully, but these errors were encountered: