Replies: 1 comment 2 replies
-
So I did some more digging since this has been quiet: In
which will never be true for oauth2? So errors are never checked and you end up with a callback error when the callback code tries to fetch an access token. So I guess this is a bug? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are using auth0 with azure ad to log users in to internal applications.
On the azure ad and auth0 side some things like AD group memberships required for authentication are checked.
If an user lacks some authorization to even login, the errors on next-auth side become completely pointless, and it seems the only useful logs from the authentication transaction with auth0 would be to have the network logs from the users client to auth0, e.g.:
Azure ad redirects back to auth0:
?error=interaction_required&error_description=The signed in user {EmailHidden} is not assigned to a role for the application
Auth0 redirects back to the next-auth app:
/api/auth/callback/auth0?error=access_denied&error_description=The signed in user {EmailHidden} is not assigned to a role for the application&state=xyz
Next-auth callback redirects to error page:
?error=Callback
Looking at the logs of the server, it has:
So is next-auth not realizing this is an error and still tries to fetch an access token which ends up masking the actual error, that would be useful to show to the user?
error
anderror_description
seem to be part of the standard, but with a quick glance, didn't seem to be a part of the source for the callback handler.Is there something to be done in the app to properly provide the original errors as the error param on the error page?
Beta Was this translation helpful? Give feedback.
All reactions