Passkey Flex React Native SDK core functions
PassageFlex.Passkey.authenticate()
Parameters
Property | Data Type | Description |
---|---|---|
transactionId | String? | Retrieve from Passage Flex API. |
Returns
String
Authenticate the user. Returns a nonce.
There are two ways to authenticate users with passkeys. Review the Authenticate Implementation Guide to learn more.
With an external identifier
Authenticate the user using a transaction ID retrieved from the Passage API using a Passkey Flex backend SDK. This requires the user to enter an external identifier (email or username) to authenticate.
Example
var nonce = passageFlex.passkey.authenticate(transactionId);
Without an external identifier
Authenticate the user using discoverable credentials. The user will not be required to type in any identifier. A typical UX for this flow is "one-click" authentication using a button. The user will be provided all passkey options for the app on the device.
Example
val nonce = passageFlex.passkey.authenticate()
PassageFlex.Passkey.register()
Parameters
Property | Data Type | Description |
---|---|---|
transactionId | String | Retrieve from Passage Flex API. |
options | PasskeyCreationOptions | (Optional) The type of authentication that will be used in this WebAuthN flow request. Defaults to
|
Returns
String
Register the user using the transaction ID you retrieve from the Passage Flex API using a Passage Flex backend SDK. You can use the nonce in a backend SDK to verify that Passage Flex has registered the user successfully.
Example
var nonce = passageFlex.passkey.register(transactionId);