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

Function authorized

auth.ts:106–110  ·  view source on GitHub ↗
({ request, auth })

Source from the content-addressed store, hash-verified

104 session: { strategy: "jwt" },
105 callbacks: {
106 authorized({ request, auth }) {
107 const { pathname } = request.nextUrl
108 if (pathname === "/middleware-example") return !!auth
109 return true
110 },
111 jwt({ token, trigger, session, account }) {
112 if (trigger === "update") token.name = session.user.name
113 if (account?.provider === "keycloak") {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected