Passkey Flex Android SDK core functions
PassageFlex.Passkey.authenticate()
Parameters
Property | Data Type | Description |
---|---|---|
transactionId | String? | Retrieve from Passage Flex API. |
activity | Activity | The activity in which to display passkey manager prompts |
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, activity)
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(null, activity)
PassageFlex.Passkey.register()
Parameters
Property | Data Type | Description |
---|---|---|
transactionId | String | Retrieve from Passage Flex API. |
activity | Activity | The activity in which to display passkey manager prompts |
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
val nonce = PassageFlex.Passkey.register(transactionId, activity)