Skip to content

signOAuthState

signOAuthState(secret, opts?): string

Defined in: oauth/state.ts:16

An OAuth state that a stateless server can check without storing anything: a random nonce and an expiry, signed with a server-side secret. Tampering with either, or using a different secret, fails verifyOAuthState. It does not bind the link to one browser: set the nonce in a cookie as well when that matters.

string

number

number

string