1. Docs
  2. API Reference
  3. OAuth hosted login: sign in with an organization SSO recovery code

OAuth hosted login: sign in with an organization SSO recovery code

POST/oauth/login/sso-recovery

The recovery form inside the hosted login's single sign-on step, for an organization administrator while the organization requires single sign-on and the identity provider is not answering. Redeems one of the organization's SSO recovery codes for the supplied email the way the Direct API's login/sso-recovery does: the address must belong to a member holding canopy:organization.manage at the organization, and the code is spent on success. Then runs the shared sign-in gate with primary amr of ["sso_recovery"], so a second factor the organization requires is still asked for, and the session starts in that organization. A wrong code, a member who does not administer, and an unknown address re-render the login page with the recovery form open and the same refusal. Throttled to 5 requests per 15 minutes.

Request body

application/json

emailstring Required
codestring Required
client_idstring Required
redirect_uristring Required
response_typestring Required
scopestring Required
statestring Required
code_challengestring Required
code_challenge_methodstring Required
noncestring Optional
organizationstring Optional

Responses

text/html

string

A redirect to the client's `redirect_uri` with `code` and `state` once the sign-in clears

application/json

  • errorApiErrorBodyDto*

text/html

string

application/json

  • errorApiErrorBodyDto*

Rate limit

5 requests per 15mPer caller: the signed-in user for a bearer token; for an API key, the key and the end user's address when a backend forwards it, otherwise the client address
Request
curl -X POST "https://auth.canopy-io.com/oauth/login/sso-recovery" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "string",
    "code": "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"
  }'
Response
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>
Related endpoints Was this page helpful?

Tell us how we can improve this guide.