@auth0/nextjs-auth0 - v4.19.0
    Preparing search index...

    Function generateDpopKeyPair

    • Generates a new ES256 key pair for DPoP (Demonstrating Proof-of-Possession) operations.

      This function creates a cryptographically secure ES256 key pair suitable for DPoP proof generation. The generated keys use the P-256 elliptic curve with SHA-256 hashing, which is the required algorithm for DPoP as specified in RFC 9449.

      Returns Promise<DpopKeyPair>

      Promise that resolves to a DpopKeyPair containing the private and public keys

      import { generateDpopKeyPair } from "@auth0/nextjs-auth0/server";

      const keyPair = await generateDpopKeyPair();

      const auth0 = new Auth0Client({
      useDPoP: true,
      dpopKeyPair: keyPair
      });