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 really like your starter kit and next-auth integration within payload. I am trying to get full user object into the middleware, but I failed in many different ways, so maybe you might have an idea how to get that.
The idea is that I can get a user.role field within middleware.
According to this post: nextauthjs/next-auth#9836 the idea is to extract entire auth.config into a separate file, just like you have, but with callbacks functions as well. But if the callback functions are added in config file, then the system brakes because it is dependend on node.js function... it seems to me that this is due to jwt method which calls dbUser, because calling local fetch functions in payload has some dependency on node enviroment.
Do you have idea how to get full user session inside of middleware? Thanks
The text was updated successfully, but these errors were encountered:
I really like your starter kit and next-auth integration within payload. I am trying to get full user object into the middleware, but I failed in many different ways, so maybe you might have an idea how to get that.
The idea is that I can get a user.role field within middleware.
According to this post: nextauthjs/next-auth#9836 the idea is to extract entire auth.config into a separate file, just like you have, but with callbacks functions as well. But if the callback functions are added in config file, then the system brakes because it is dependend on node.js function... it seems to me that this is due to jwt method which calls dbUser, because calling local fetch functions in payload has some dependency on node enviroment.
Do you have idea how to get full user session inside of middleware? Thanks
The text was updated successfully, but these errors were encountered: