File tree Expand file tree Collapse file tree
auth0/src/main/java/com/auth0/android/embedded
sample-embedded/src/main/java/com/auth0/sample/embedded Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ public sealed interface NextAction {
3535 *
3636 * [options] exposes the main WebAuthn options. [requestJson] is the complete options object the
3737 * server sent, ready to use as the request JSON of a Credential Manager `GetPublicKeyCredentialOption`.
38- * The challenge is single-use : after a failed attempt the server offers a new [VerifyPasskey] with a
39- * fresh one.
38+ * Use each challenge for one attempt : after a failed attempt the server offers a new [VerifyPasskey]
39+ * with a fresh one.
4040 */
4141 @ConsistentCopyVisibility
4242 public data class VerifyPasskey internal constructor(
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ package com.auth0.android.embedded.passkey
55 */
66@ConsistentCopyVisibility
77public data class PasskeyRequestOptions internal constructor(
8- /* * The single-use, base64url-encoded challenge the authenticator signs. */
8+ /* * The base64url-encoded challenge the authenticator signs. Use it for one attempt only . */
99 public val challenge : String ,
1010
1111 /* * How long, in milliseconds, the ceremony may take. */
Original file line number Diff line number Diff line change @@ -85,15 +85,16 @@ try {
8585| Property | Description |
8686| --- | --- |
8787| ` requestJson ` | The complete options object, ready for ` GetPublicKeyCredentialOption ` . Use this to run the ceremony. |
88- | ` options.challenge ` | The single-use challenge. |
88+ | ` options.challenge ` | The challenge. Use it for one attempt only . |
8989| ` options.timeout ` | How long, in milliseconds, the ceremony may take. |
9090| ` options.rpId ` | The relying party the passkey is scoped to. |
9191| ` options.userVerification ` | ` REQUIRED ` , ` PREFERRED ` or ` DISCOURAGED ` . |
9292| ` options.hints ` | Preferred authenticator hints. Empty when the server sent none. |
9393| ` options.allowCredentials ` | The credentials the server restricts the ceremony to, each as the server sent it. Empty when the server sent none. |
9494
95- Each challenge works once. After a rejected passkey, use the new ` VerifyPasskey ` from the error's
96- ` nextActions ` ; don't reuse the previous ` requestJson ` .
95+ Use each challenge for one attempt. After a rejected passkey, use the new ` VerifyPasskey ` from the error's
96+ ` nextActions ` ; don't reuse the previous ` requestJson ` . A rejection leaves only the passkey action to continue
97+ with, so to let the user sign in another way, start a new flow with ` authorize() ` .
9798
9899<details >
99100 <summary >Using callbacks</summary >
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ import kotlinx.coroutines.launch
3333/* *
3434 * Offers passkey sign-in. Runs the Credential Manager ceremony with the server's [requestJson] and
3535 * hands the resulting `authenticationResponseJson` to [onAssertion]. A canceled or failed ceremony
36- * leaves the flow unchanged, so the user can retry or pick another action.
36+ * leaves the flow unchanged, so the user can retry or pick another action. A passkey the server rejects
37+ * leaves only a new passkey offer, so signing in another way means starting a new flow.
3738 */
3839@Composable
3940internal fun PasskeyCard (
You can’t perform that action at this time.
0 commit comments