{"record":{"id":"c485f930542b18db","repo":"nextauthjs/next-auth","slug":"unsupported-action","errorCode":null,"errorMessage":"Unsupported action","messagePattern":"Unsupported action","errorType":"exception","errorClass":"UnknownAction","httpStatus":null,"severity":"error","filePath":"packages/core/src/lib/pages/index.ts","lineNumber":90,"sourceCode":"        value: \"\",\n        options: { ...options.cookies.csrfToken.options, maxAge: 0 },\n      })\n      return { status: 404, cookies }\n    },\n    providers(providers: InternalProvider[]) {\n      return {\n        headers: { \"Content-Type\": \"application/json\" },\n        body: providers.reduce<Record<string, PublicProvider>>(\n          (acc, { id, name, type, signinUrl, callbackUrl }) => {\n            acc[id] = { id, name, type, signinUrl, callbackUrl }\n            return acc\n          },\n          {}\n        ),\n      }\n    },\n    signin(providerId?: string, error?: any) {\n      if (providerId) throw new UnknownAction(\"Unsupported action\")\n      if (pages?.signIn) {\n        let signinUrl = `${pages.signIn}${\n          pages.signIn.includes(\"?\") ? \"&\" : \"?\"\n        }${new URLSearchParams({ callbackUrl: params.callbackUrl ?? \"/\" })}`\n        if (error) signinUrl = `${signinUrl}&${new URLSearchParams({ error })}`\n        return { redirect: signinUrl, cookies }\n      }\n\n      // If we have a webauthn provider with conditional UI and\n      // a simpleWebAuthnBrowserScript is defined, we need to\n      // render the script in the page.\n      const webauthnProvider = providers?.find(\n        (p): p is InternalProvider<\"webauthn\"> =>\n          p.type === \"webauthn\" &&\n          p.enableConditionalUI &&\n          !!p.simpleWebAuthnBrowserVersion\n      )\n","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/nextauthjs/next-auth/blob/a1a16a5a7780488c7449feece410033f445d0b31/packages/core/src/lib/pages/index.ts#L72-L108","documentation":"The built-in signin page handler throws UnknownAction(\"Unsupported action\") when signin() is called with a providerId argument. A specific provider signin must be handled by rendering the provider list page or redirecting directly, not through this page action.","triggerScenarios":"Requesting /auth/signin/<providerId> while the pages.signIn page is rendered (the signin page action receives a providerId), meaning the framework tried to route a provider-specific signin through the generic sign-in page handler.","commonSituations":"Custom page configuration where pages.signIn is set and a link points to /auth/signin/google instead of initiating signin via signIn('google') client-side; broken manual links on a custom sign-in page.","solutions":["Link to /auth/signin (no provider id) on the sign-in page and trigger provider sign-in via the client signIn() helper","Use /auth/signin only for the provider-list page; start provider flows with signIn(providerId) from the browser","If you want direct provider redirects via URL, ensure pages.signIn is not intercepting that route"],"exampleFix":"// before\n<a href=\"/auth/signin/github\">Sign in with GitHub</a>  <!-- on custom pages.signIn -->\n// after\n<button onClick={() => signIn(\"github\")}>Sign in with GitHub</button>","handlingStrategy":"try-catch","validationCode":"const providerMatch = pathname.match(/^\\/auth\\/signin\\/(.+)$/); if (providerMatch && customSignInPageEnabled) throw new Error(\"Provider-specific signin must use client signIn(), not the sign-in page\");","typeGuard":"null","tryCatchPattern":"try { return await renderSignInPage(providerId) } catch (e) { if (String(e.message).includes(\"Unsupported action\")) return Response.redirect(\"/auth/signin\"); throw e; }","preventionTips":["Never link to /auth/signin/<providerId>; use the client signIn(providerId) helper","Keep custom sign-in page links pointing at the provider-less signin URL","Review custom pages config for route conflicts with provider signin"],"tags":["auth","signin-page","unsupported-action"],"backgroundTag":"unknown-auth-action","analyzedSha":"a1a16a5a7780488c7449feece410033f445d0b31","analyzedAt":"2026-08-28T21:52:38.200Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}