drupflare/worker - v1.0.4
    Preparing search index...

    Function verifyIdToken

    • Verifies an id_token end to end and returns its claims.

      Each refusal is separate and separately tested, since a missing one fails silently: signature (anyone mints a login), iss (another provider's token), aud (a token for a different application of the same provider, the confused-deputy case), expiry and nonce (replay).

      alg comes from the key, never from the token header alone: trusting the header is how none and the RS256-to-HS256 confusion attack work.

      Parameters

      Returns Promise<{ claims: IdTokenClaims } | { refusal: string }>