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 have a system in which the user might be logged in and he can be related to different groups.
I also have a pages and each page can define which people have access.
So essentially, i want to make a middleware or laverage next auth api somehow to check on backend if the user has access to current page and if not, to redirect him somewhere, how can i do that? because i don't have that info when making for example a custom CredientialsProvider, but that's depends on current user page
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 have a system in which the user might be logged in and he can be related to different groups.
I also have a pages and each page can define which people have access.
So essentially, i want to make a middleware or laverage next auth api somehow to check on backend if the user has access to current page and if not, to redirect him somewhere, how can i do that? because i don't have that info when making for example a custom CredientialsProvider, but that's depends on current user page
Beta Was this translation helpful? Give feedback.
All reactions