You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e8eb940
Browse filesBrowse the repository at this point in the historyBrowse files
feat: add Passkey.getImmediate for silent credential checks
Adds support for silent / opportunistic passkey checks via a new
`Passkey.getImmediate(request)` API that returns a `NoCredentials`
error without showing the system modal when no credential is
available on the device.
- iOS 16+: uses `ASAuthorizationController.preferImmediatelyAvailableCredentials`
- Android: passes `preferImmediatelyAvailableCredentials = true` on `GetCredentialRequest`
- iOS < 16: falls back to a regular `get()` (no native silent support)
Also tightens native error surfacing and Android null-safety:
- iOS: maps `ASAuthorizationError` code 1005 to a new `NoCredentials` case.
- Android: maps `androidx.credentials.exceptions.domerrors.*` to the existing
cross-platform error codes via a new `mapDomError` helper, replacing the
raw error message that previously leaked through. Adds `InvalidStateError ->
CredentialAlreadyExists` and explicit handling of `TimeoutError`,
`NotSupportedError`, etc.
- Android: returns `RequestFailed` / `UnknownError` instead of silently
resolving with `null` when there is no foreground activity or the native
bundle response is missing.
Updates README with usage docs for `getImmediate` and a normalised
error-code reference table.
Closes#91
|`UserCancelled`| User dismissed the system sheet |
199
+
|`InvalidChallenge`| The provided challenge could not be decoded |
200
+
|`InvalidUserId`| The provided user id could not be decoded (registration only) |
201
+
|`BadConfiguration`| App is not configured correctly (associated domain / asset links) |
202
+
|`NoCredentials`| No credential is available — also returned for silent `getImmediate()`|
203
+
|`CredentialAlreadyExists`| A passkey already exists for this account on this device (registration) |
204
+
|`Interrupted`| The operation was interrupted and may be retried |
205
+
|`TimedOut`| The operation timed out |
206
+
|`UnknownError`| Unknown / unmapped error |
207
+
156
208
### Force Platform or Security Key (iOS-specific)
157
209
158
210
You can force users to register and authenticate using either a platform key, a security key (like [Yubikey](https://www.yubico.com/)) or allow both using the following methods. This only works on iOS, Android will ignore these instructions.
0 commit comments