MCPcopy Index your code
hub / github.com/nextauthjs/next-auth-example / jwt

Function jwt

auth.ts:111–117  ·  view source on GitHub ↗
({ token, trigger, session, account })

Source from the content-addressed store, hash-verified

109 return true
110 },
111 jwt({ token, trigger, session, account }) {
112 if (trigger === "update") token.name = session.user.name
113 if (account?.provider === "keycloak") {
114 return { ...token, accessToken: account.access_token }
115 }
116 return token
117 },
118 async session({ session, token }) {
119 if (token?.accessToken) session.accessToken = token.accessToken
120

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected