Skip to content
Discussion options

You must be logged in to vote

I'm assuming you are using JWTs since you say you want to store your users roles inside the session? If not, I'm confused since NextAuth has support for normal db session, and it creates a session for a user in the session table. So you could easily just fetch the user-roles in the session() function or modify the adapter to include it when getUser() is called.

This way, when you remove a user's role, the keepAlive trigger will reflect this as soon as it is triggered.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@trey-m
Comment options

@Fronix
Comment options

Answer selected by trey-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants