{"record":{"id":"6e21cf6ea61a0c14","repo":"nextauthjs/next-auth","slug":"provider-id-provider-does-not-refer-to-a-weba-6e21cf","errorCode":null,"errorMessage":"Provider id \"${provider}\" does not refer to a WebAuthn provider.\nPlease use `import { signIn } from \"next-auth/react\"` instead.","messagePattern":"Provider id \"(.+?)\" does not refer to a WebAuthn provider\\.\nPlease use `import (.+?) from \"next-auth/react\"` instead\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/next-auth/src/webauthn.ts","lineNumber":92,"sourceCode":"    redirect = true,\n    ...signInParams\n  } = rest\n\n  const baseUrl = apiBaseUrl(__NEXTAUTH)\n  const providers = await getProviders()\n\n  if (!providers) {\n    window.location.href = `${baseUrl}/error`\n    return // TODO: Return error if `redirect: false`\n  }\n\n  if (\n    !provider ||\n    !providers[provider] ||\n    providers[provider].type !== \"webauthn\"\n  ) {\n    // TODO: Add docs link with explanation\n    throw new TypeError(\n      [\n        `Provider id \"${provider}\" does not refer to a WebAuthn provider.`,\n        'Please use `import { signIn } from \"next-auth/react\"` instead.',\n      ].join(\"\\n\")\n    )\n  }\n\n  const webAuthnBody: Record<string, unknown> = {}\n  const webAuthnResponse = await webAuthnOptions(\n    provider,\n    __NEXTAUTH,\n    signInParams\n  )\n  if (webAuthnResponse.error) {\n    logger.error(new Error(await webAuthnResponse.error.text()))\n    return\n  }\n  webAuthnBody.data = JSON.stringify(webAuthnResponse.data)","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/nextauthjs/next-auth/blob/a1a16a5a7780488c7449feece410033f445d0b31/packages/next-auth/src/webauthn.ts#L74-L110","documentation":"next-auth v5 splits WebAuthn (passkey) sign-in out of the generic signIn helper. This TypeError is thrown by signIn in \"next-auth/webauthn\" when the given provider id does not exist or is not a WebAuthn provider, telling you to use the regular \"next-auth/react\" signIn instead.","triggerScenarios":"Calling `signIn(providerId, ...)` from \"next-auth/webauthn\" with a provider id that is undefined, not present in the providers list, or whose type !== \"webauthn\".","commonSituations":"Passing a credentials/oauth provider id (e.g. \"credentials\", \"github\") to the WebAuthn-specific signIn; a typo in the provider id; providers config missing the WebAuthn provider so the id lookup fails.","solutions":["Use `signIn` from \"next-auth/react\" for non-WebAuthn providers","Verify the provider id matches a provider of type \"webauthn\" in your auth config","Check the providers list returned from the server includes the provider id you pass"],"exampleFix":"// before\nimport { signIn } from \"next-auth/webauthn\"\nsignIn(\"github\") // TypeError\n// after\nimport { signIn } from \"next-auth/react\"\nsignIn(\"github\")","handlingStrategy":"validation","validationCode":"const providers = await getProviders() // from next-auth/react\nconst isWebAuthn = providerId != null && providers?.[providerId]?.type === \"webauthn\"\nif (!isWebAuthn) {\n  const { signIn } = await import(\"next-auth/react\")\n  return signIn(providerId)\n}","typeGuard":"function isWebAuthnProvider(\n  p: unknown\n): p is { id: string; type: \"webauthn\" } {\n  return (\n    typeof p === \"object\" && p !== null &&\n    (p as any).type === \"webauthn\"\n  )\n}","tryCatchPattern":"try {\n  await webauthnSignIn(providerId)\n} catch (e) {\n  if (e instanceof TypeError) {\n    // wrong entry point or provider id — fall back to generic signIn\n    await signIn(providerId)\n  } else throw e\n}","preventionTips":["Check the provider type via getProviders() before choosing which signIn to import","Only use next-auth/webauthn for providers of type \"webauthn\"","Validate provider ids against your auth config","Keep a single typed helper that dispatches to the correct signIn"],"tags":["webauthn","provider","react","wrong-api"],"backgroundTag":"wrong-provider-entrypoint","analyzedSha":"a1a16a5a7780488c7449feece410033f445d0b31","analyzedAt":"2026-08-28T21:52:38.200Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}