loginWithWebAuthn

AppDelegate.reachfive().loginWithWebAuthn(
    email,
    origin,
    viewController,
    // Optional arguments
    scopes
)

Description

A user with an already registered credential can authenticate with a registered FIDO2 device. This method will get a FIDO2 pending intent for authentication with the options returned by the ReachFive server and launch it.

It will then parse the resulting intent and if successful, the user receives a one-time authentication token. An authentication callback task is then launched to exchange the token with the server for an access token.

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

Examples

import IdentitySdkCore

AppDelegate
    .reachfive()
    .loginWithWebAuthn(
        email: "john.doe@gmail.com",
        origin: "https://dev-sandbox-268508.web.app",
        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

email string

The email address of the profile.

origin string

The origin of the call.

viewController string

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

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