younifyd
Menu

Authorize Webauthn Registration

Authorize user for WebAuthn registration

POST/organizations/{organizationId}/oauth2/webauthn/register/authorize

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Authorize Webauthn Registration action (under Auth (SLAS)).
  3. Fill in the fields below, then reference the result from later steps as {{authorizeWebauthnRegistration.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/get-started.html) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/get-started.html#instance-types).

Headers

Authorizationstring

Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`). For example: `clientId:clientSecret`.

Request body

Enter the body as JSON in the step's Body field.

user_idstringrequired

User ID for logging in. This is the id that is used to log into SFCC.

modestringrequired

Password Action delivery modes

One ofcallbacksmsemail

channel_idstringrequired

The channel (B2C Commerce site) that the user is associated with.

localestring

The locale of the template. Required when the mode is `email` or `sms`.

client_idstring

-| The public client ID. Requires setting `grant_type` to `passwordless_login_pkce`. When using the `hint` query parameter either a public or private client ID can be used.

code_challengestring

PKCE code challenge. Created by the client. The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. Requires setting `grant_type` to `passwordless_login_pkce`

callback_uristring

The callback uri. Required when the mode is `callback`. The `callback_uri` property will be validated against the callback URIs that have been registered with the SLAS client. The callback URI _must_ be a `POST` endpoint because the token will be included in the body. Wildcards are not allowed in the callback_uri because this is a security risk that can expose the token. This is not considered an OAuth2 callback_url.

idp_namestring

The name of the 3rd party identity provider for the user ID

hintstring

Adding a `hint` query parameter with a value of `cross_device` will remove the need to have the code_challenge for password reset request. If the `hint` query parameter is used it must also be used in the password reset request.

json
{
  "user_id": "samantha.sampleson@example.com",
  "mode": "email",
  "channel_id": "RefArch",
  "locale": "en-us",
  "client_id": "6b200ebd-7843-4073-aef9-792482c9e1de",
  "code_challenge": "Nx_Vf0-0W6SpyRVBVTbl8VSu2OE4yD2fZNExW6N3V_Q",
  "callback_uri": "http://localhost:9050/password/reset/callback",
  "idp_name": "okta",
  "hint": "cross_device"
}

Response

Returns 204 with a any. Read it in later steps with {{authorizeWebauthnRegistration.response.data.<field>}}.

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.