Skip to content
Discussion options

You must be logged in to vote

The role and email are in user, not in token, here's my code

    callbacks: {
        async session({ session, token }) {
            return {
                ...session,
                token,
            };
        },
        async jwt({ token, user }) {
            if (user) {
                return user;
            }

            return token;
        },
    },

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@S7012MY
Comment options

@S7012MY
Comment options

Answer selected by S7012MY
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