verifySolution() is called server-side in your verify endpoint to check that the browser correctly solved all challenge tokens. It validates the JWT signature, token expiry, the SHA-256 hash proof, replay state, and optional context binding.
Import
Signature
Parameters
ChallengeToken | ChallengeToken[]
required
The original JWT token(s) returned by
createChallenge(). Pass the same tokens your challenge endpoint issued.number | string | Array<number | string> | ChallengeSolution | ChallengeSolution[]
required
The solution(s) submitted by the browser. Can be:
- A single nonce string
- An array of nonce strings
- A
ChallengeSolutionobject{ nonce: string; hash: string } - An array of
ChallengeSolutionobjects (what the widget sends assolutions)
VerifySolutionOptions
Optional configuration object. See the options table below.
Options
Return value
Promise<VerifySolutionResult>. The function returns either: