OAuth hosted login: acknowledge recovery codes
/oauth/mfa-enroll-codes-ackFinal step of hosted MFA enrollment: the person confirms they saved their recovery codes. Validates the sealed ack_token (state verified, matching client_id). Without acknowledged=true it mints nothing and shows the same codes again, from the sealed codes_token the page carried, with the reason. With it, mints the authorization code (stamping the OIDC amr from the enrolled factor) and redirects to the client's redirect_uri. Renders an expired-session page when a token is invalid. Works without JavaScript. Throttled to 10 requests per minute.
Request body
application/json
ack_tokenstring Required client_idstring Required redirect_uristring Required response_typestring Required scopestring Required statestring Optional code_challengestring Required code_challenge_methodstring Required noncestring Optional codes_tokenstring Required The recovery codes as the page received them, sealed. Opaque to the browser.
acknowledgedstring Optional Present and `true` when the person ticked "I've saved my recovery codes". Absent or anything else shows the codes again with the reason; no code is minted.
Responses
text/html
stringA redirect to the client's `redirect_uri` with `code` and `state` once the sign-in clears
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Rate limit
curl -X POST "https://auth.canopy-io.com/oauth/mfa-enroll-codes-ack" \ -H "Content-Type: application/json" \ -d '{ "ack_token": "string", "client_id": "string", "redirect_uri": "string", "response_type": "string", "scope": "string", "state": "string", "code_challenge": "string", "code_challenge_method": "string", "nonce": "string", "codes_token": "string", "acknowledged": "string" }'
Content-Type: text/html
<!doctype html>
<html lang="en">
<head>…</head>
<body>
<!-- The hosted page: its form, any error, and the Environment's branding -->
</body>
</html>Tell us how we can improve this guide.