Passkey Flex Android SDK core functions
PassageFlex.Passkey.authenticate()
Parameters
Property | Data Type | Description |
---|---|---|
transactionId | String? | Retrieve from Passkey 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 a external identifier (email or username) to authenticate.
Example
val nonce = passageFlex.passkey.authenticate(transactionId)
Without an external identifier
Authenticate the user using discoverable credentials. The user is not 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 Passkey 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 Passkey Flex API using a Passkey Flex backend SDK. You can use the nonce in a backend SDK to verify that Passkey has registered the user successfully.
Example
val nonce = passageFlex.passkey.register(transactionId)