metadata in next-auth

in next-auth is it possible to add metadata for special authrozations?

signIn('google', { metadata: {code: "extra data here"}))


and I want to get this metadata in
session


 callbacks: {
        session: async ({ session, token }) => {
            console.log(session.metadata.code)

            return session
        },


it would be nicer if I can get that metadata in
createUser
Was this page helpful?