How Cascade handles authentication and authorization.
Session
object with some additional types to make it work with Cascade. We need to add role
and planId
to the user object.
role
and planId
to the session object. This is done to make sure that whenever you are working with Session from NextAuth.js you have all the necessary information about the user.