Skip to content

Commit 6a41a42

Browse files
committed
Few doc update
1 parent 102782f commit 6a41a42

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎auth0/src/main/java/com/auth0/android/embedded/authorize/NextAction.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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(

‎auth0/src/main/java/com/auth0/android/embedded/passkey/PasskeyRequestOptions.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package com.auth0.android.embedded.passkey
55
*/
66
@ConsistentCopyVisibility
77
public 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. */

‎examples/embedded-auth/passkey.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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>

‎sample-embedded/src/main/java/com/auth0/sample/embedded/PasskeyCard.kt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
3940
internal fun PasskeyCard(

0 commit comments

Comments
 (0)