signupWithWebAuthn

AppDelegate.reachfive().signupWithWebAuthn(
    profile,
    origin,
    viewController,
    // Optional arguments
    friendlyName,
    scopes
)

Description

The user requests to register a new account for the first time. This method retrieves a FIDO2 pending intent for signup with the options returned by the ReachFive server and launches it.

It parses then the resulting intent and if successful, registers the new user and sends a verification code or token to the provided email address.

  • The WebAuthn feature must be enabled on your ReachFive account.

Examples

import IdentitySdkCore

AppDelegate
    .reachfive()
    .signupWithWebAuthn(
        profile: ProfileWebAuthnSignupRequest(
            email: "john.doe@gmail.com",
            givenName: "John",
            familyName: "Doe"
        ),
        origin: "https://dev-sandbox-268508.web.app",
        friendlyName: "iPhone 11",
        scopes: ["openid", "email", "profile", "phone", "full_write", "offline_access"],
        viewController: self
    )
    .onSuccess { authToken in
        // Get the profile's authentication token
    }
    .onFailure { error in
        // Return a ReachFive error
    }

Parameters

profile ProfileSignupRequest

The data of the profile.

password string

The password of the profile. Password must meet the minimum requirements defined by the zxcvbn used.

email string

The primary email address of the profile.

phoneNumber string

The primary phone number of the profile.

Both the international format and the national conventions of the account’s country are accepted if configured in account settings.

givenName string

The given name of the profile.

middleName string

The middle name of the profile.

familyName string

The family name of the profile.

name string

The full name of the profile.

nickname string

The nickname of the profile.

birthdate string

The birthdate of the profile, represented as an ISO 8601 YYYY-MM-DD format.

profileURL string

The URL of one of the user’s profile page (usually a social provider’s page).

picture string

The URL of one of the profile picture. This URL refers to an image file (PNG, JPEG, or GIF image file).

username string

The username of the profile (the login’s name).

gender string

The gender of the profile.

Allowed values are female, male and other.

company string

The company’s name of the profile.

addresses ProfileAddress[]

The list of the profile’s postal addresses

locale string

The profile’s language code in lowercase and country code in uppercase, separated by a dash (eg en, fr-FR …​).

bio string

The biography of the profile.

customFields Map<string, any>

The custom fields of the profile.

consents Map<string, Consent>

The consents granted to the profile. It is a map of string keys with the associated consent object.

origin string

The origin of the call.

viewController string

An object that manages a view hierarchy for your UIKit app.

friendlyName string

The name of the FIDO2 device. Each device must have a unique name.

Default to the name of the iOS product.

scopes string[]

The scopes granted to the profile. Make sure they are allowed by the client.

Default scopes are the allowed scopes set up in the client’s configuration.

Feedback