OAuth hosted login: verify the passwordless login code
/oauth/login/email-otp/verifyStep 2 of the hosted passwordless email-OTP login: verifies the emailed code. On success it runs the shared MFA gate (trusted-device short-circuit, then challenge / enrollment / grace as required) with primary amr of ["otp"], mints an authorization code, and consumes the single-use login code. On failure it re-renders the code-entry view with a generic error. Throttled to 10 requests per 10 minutes.
Request body
application/json
emailstring Required client_idstring Required redirect_uristring Required response_typestring Required scopestring Required statestring Optional code_challengestring Required code_challenge_methodstring Required noncestring Optional organizationstring Optional codestring Required The 6-digit login code received via email.
remember_deviceboolean Optional Remember this browser so the next hosted sign-in from it skips the second factor. Honoured only when the Environment's `mfa_trusted_device_days` is above 0 (the default is 0, which disables remembering); the trust rides in the httpOnly `ca_identity_mfa_trusted_device` cookie on Canopy's domain.
Responses
text/html
stringA redirect to the client's `redirect_uri`: with `code` and `state` once the sign-in clears, or with `error` and `state` when a verified client's request is refused (an unsupported `response_type`, `code_challenge_method` or scope, a malformed `organization`, or an organization the person does not belong to)
application/json
error *ApiErrorBodyDto
text/html
stringapplication/json
error *ApiErrorBodyDto
Rate limit
curl -X POST "https://auth.canopy-io.com/oauth/login/email-otp/verify" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "client_id": "string", "redirect_uri": "string", "response_type": "string", "scope": "string", "state": "string", "code_challenge": "string", "code_challenge_method": "string", "nonce": "string", "organization": "string", "code": "123456", "remember_device": false }'
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.