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
I'm introducing new rules in an existing website that blocks login of users that doesn't have the proper permission. I can successful get who has access or no, but I'm can't make works a redirect to a custom page to display the error message. How can I make this redirect? If returns false NextAuth redirects to a default error page, I need to redirect to a custom page.
note: if the user trying to login don't have access, the API returns 404 code, so the catch block is executed.
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.
-
I'm introducing new rules in an existing website that blocks login of users that doesn't have the proper permission. I can successful get who has access or no, but I'm can't make works a redirect to a custom page to display the error message. How can I make this redirect? If returns false NextAuth redirects to a default error page, I need to redirect to a custom page.
note: if the user trying to login don't have access, the API returns 404 code, so the catch block is executed.

Beta Was this translation helpful? Give feedback.
All reactions