Options to create a passkey (WebAuthn); the challenge lives 5 minutes and can be used once
const url = 'https://api.replifier.com/v1/me/passkeys/options';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/me/passkeys/optionsIf any organization of the user requires MFA: with a factor already registered, adding or removing passkeys requires a two-factor session (403 mfa_required); with none, a code session can register the first one only if, in ALL those organizations, less than 72 h have passed since the user joined or since require_mfa was turned on (whichever is more recent), or the user has an active grant from an owner or admin (403 mfa_enrollment_required). Registering the first factor notifies the user and the owners of those organizations. Adding or removing passkeys also requires the session to have passed its last factor less than 10 minutes ago (403 reauth_required).
Responses
Section titled “Responses”Options for navigator.credentials.create()
object
Example generated
{ "additionalProperty": "example"}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}