This method lets you validate server-side whether a user has successfully completed an authentication challenge via the Authsignal pre-built UI or an Authsignal Client SDK.After obtaining a short-lived token from the pre-built UI or a Client SDK, pass this token to your server to determine the result.
const request = { action: "signIn", token: "eyJhbGciOiJ...",};const response = await authsignal.validateChallenge(request);if (response.state === "CHALLENGE_SUCCEEDED") { // The user completed the challenge successfully // Proceed with authenticated action} else { // The user did not complete the challenge successfully}