pkce (oauth/checks.ts)

next-auth · packages/core/src/lib/actions/callback/oauth/checks.ts · typescript · ISC
auth, Auth / Identity

Provides PKCE, state, nonce, and cookie handling for OAuth authentication.

// Source: https://github.com/nextauthjs/next-auth | License: ISC | Copyright 2022-2024, Balázs Orbán
// Provided via justclaw.it.com; keep this notice with the code.
import * as o from "oauth4webapi"
import { InvalidCheck } from "../../../../errors.js"

// NOTE: We use the default JWT methods here because they encrypt/decrypt the payload, not just sign it.
import { decode, encode } from "../../../../jwt.js"

import type {
  CookiesOptions,
  InternalOptions,
  RequestInternal,
  User,
} from "../../../../types.js"
import type { Cookie } from "../../../utils/cookie.js"
import type { WebAuthnProviderType } from "../../../../providers/webauthn.js"

interface CookiePayload {
  value: string
  /**
   * The id of the provider that created this cookie. Since the cookie names
   * are not provide

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key