|
22 | 22 | - [Usage](#usage) |
23 | 23 | - [Requiring Authentication](#requiring-authentication) |
24 | 24 | - [Handling Credentials Manager exceptions](#handling-credentials-manager-exceptions) |
| 25 | + - [Passkeys](#passkeys) |
25 | 26 | - [Bot Protection](#bot-protection) |
26 | 27 | - [Management API](#management-api) |
27 | 28 | - [Link users](#link-users) |
@@ -131,7 +132,7 @@ WebAuthProvider.logout(account) |
131 | 132 | .start(this, logoutCallback) |
132 | 133 | ``` |
133 | 134 |
|
134 | | -## Trusted Web Activity (Experimental) |
| 135 | +## Trusted Web Activity |
135 | 136 | > **Warning** |
136 | 137 | > Trusted Web Activity support in Auth0.Android is still experimental and can change in the future. |
137 | 138 | > |
@@ -607,6 +608,75 @@ when(credentialsManagerException) { |
607 | 608 | } |
608 | 609 | ``` |
609 | 610 |
|
| 611 | +## Passkeys |
| 612 | +User should have a custom domain configured and passkey grant-type enabled in the Auth0 dashboard to use passkeys. |
| 613 | + |
| 614 | +To sign up a user with passkey |
| 615 | + |
| 616 | +```kotlin |
| 617 | +PasskeyAuthProvider.signUp(account) |
| 618 | + .setEmail("user email") |
| 619 | + .setUserName("user name") |
| 620 | + .setPhoneNumber("phone number") |
| 621 | + .setRealm("optional connection name") |
| 622 | + .start(object: Callback<Credentials, AuthenticationException> { |
| 623 | + override fun onFailure(exception: AuthenticationException) { } |
| 624 | + |
| 625 | + override fun onSuccess(credentials: Credentials) { } |
| 626 | + }) |
| 627 | +``` |
| 628 | +<details> |
| 629 | + <summary>Using Java</summary> |
| 630 | + |
| 631 | +```java |
| 632 | +PasskeyAuthProvider authProvider = new PasskeyAuthProvider(); |
| 633 | +authProvider.signUp(account) |
| 634 | + .setEmail("user email") |
| 635 | + .setUserName("user name") |
| 636 | + .setPhoneNumber("phone number") |
| 637 | + .setRealm("optional connection name") |
| 638 | + .start(new Callback<Credentials, AuthenticationException>() { |
| 639 | + @Override |
| 640 | + public void onFailure(@NonNull AuthenticationException exception) { } |
| 641 | + |
| 642 | + @Override |
| 643 | + public void onSuccess(@Nullable Credentials credentials) { } |
| 644 | + }); |
| 645 | +``` |
| 646 | +</details> |
| 647 | + |
| 648 | +To sign in a user with passkey |
| 649 | +```kotlin |
| 650 | +PasskeyAuthProvider.signin(account) |
| 651 | + .setRealm("Optional connection name") |
| 652 | + .start(object: Callback<Credentials, AuthenticationException> { |
| 653 | + override fun onFailure(exception: AuthenticationException) { } |
| 654 | + |
| 655 | + override fun onSuccess(credentials: Credentials) { } |
| 656 | + }) |
| 657 | +``` |
| 658 | +<details> |
| 659 | + <summary>Using Java</summary> |
| 660 | + |
| 661 | +```java |
| 662 | +PasskeyAuthProvider authProvider = new PasskeyAuthProvider(); |
| 663 | +authProvider.signin(account) |
| 664 | + .setRealm("optional connection name") |
| 665 | + .start(new Callback<Credentials, AuthenticationException>() { |
| 666 | + @Override |
| 667 | + public void onFailure(@NonNull AuthenticationException exception) { } |
| 668 | + |
| 669 | + @Override |
| 670 | + public void onSuccess(@Nullable Credentials credentials) { } |
| 671 | + }); |
| 672 | +``` |
| 673 | +</details> |
| 674 | + |
| 675 | +**Points to be Noted**: |
| 676 | +Passkeys are supported only on devices that run Android 9 (API level 28) or higher. |
| 677 | +To use passkeys ,user needs to add support for Digital Asset Links. |
| 678 | + |
| 679 | + |
610 | 680 | ## Bot Protection |
611 | 681 | If you are using the [Bot Protection](https://auth0.com/docs/anomaly-detection/bot-protection) feature and performing database login/signup via the Authentication API, you need to handle the `AuthenticationException#isVerificationRequired()` error. It indicates that the request was flagged as suspicious and an additional verification step is necessary to log the user in. That verification step is web-based, so you need to use Universal Login to complete it. |
612 | 682 |
|
|
0 commit comments