You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an OAuthCallbackError is thrown, I can see the actual error code in the Next.js server console, but in the client, it just appends error=OAuthCallbackError in the url and leaves it there. How do I get to the actual error code? It's important to display the right kind of error message to the end-user. Right now all we can do is basically little more than "Something went wrong" which only adds more frustration for a user, should it ever occur.
So this is on the Next.js app router, if that helps to know. And Auth.js 5.0 beta 29. It's not specific to any single provider or adapter. It's effectively a generic question of "how to catch an error with details".
Unfortunately, the documentation is quite clear on what the errors mean, but is quite vague on how to catch all those errors (including OAuthCallbackError in particular).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When an OAuthCallbackError is thrown, I can see the actual error code in the Next.js server console, but in the client, it just appends
error=OAuthCallbackErrorin the url and leaves it there. How do I get to the actual error code? It's important to display the right kind of error message to the end-user. Right now all we can do is basically little more than "Something went wrong" which only adds more frustration for a user, should it ever occur.So this is on the Next.js app router, if that helps to know. And Auth.js 5.0 beta 29. It's not specific to any single provider or adapter. It's effectively a generic question of "how to catch an error with details".
Unfortunately, the documentation is quite clear on what the errors mean, but is quite vague on how to catch all those errors (including OAuthCallbackError in particular).
Beta Was this translation helpful? Give feedback.
All reactions