feat: support native passkeys without running a flow - #182
Conversation
|
🐕 Review complete — View session on Shuni Portal 🐾 |
🐕 Suggested ReviewersThe review assignment covers different aspects of the code changes—documentation and dependency management—to ensure comprehensive review coverage for the PR.
Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best. |
There was a problem hiding this comment.
🐕 Shuni's Review
Adds a native descope.passkey API (isSupported/signUp/signIn/signUpOrIn/add) that drives the WebAuthn ceremony through the vendored Swift/Kotlin SDKs while core-js-sdk handles the start/finish calls. Good bones — the JS orchestration mirrors the native SDKs exactly, create branching is right, and the tests cover the happy paths, the failed-start short circuit, and cancellation.
Sniffed out 2 issues:
- 1 🟡 MEDIUM: passkey rejections drop the detailed
DescopeException.message - 1 🟢 LOW: iOS reports passkeys supported on iOS 15
See inline comments for details. Woof!
Declared coverage: FULL — 14/14 changed files reviewed.
|
🐕 Review complete — View session on Shuni Portal 🐾 |
There was a problem hiding this comment.
🐕 Shuni's Review
Re-reviewed the delta since 9ce7375 — one Kotlin line and an iOS refactor extracting a shared rejectPasskey helper. The error-detail fix is correct on both platforms, and folding the two-branch catch into one helper is cleaner than what I asked for. Good bones!
Sniffed out 1 issue:
- 1 🟢 LOW: iOS and Android forward different
codevalues for the same passkey error
Note: the error-message thread is genuinely fixed, but GitHub denies this bot the resolve permission — needs a manual click. See inline for details. Woof!
Declared coverage: PARTIAL — 2/14 changed files reviewed.
|
🐕 Review complete — View session on Shuni Portal 🐾 |
There was a problem hiding this comment.
🐕 Shuni's Review
Delta since e369ab4 is two one-line changes — both rejectPasskey helpers now pass message through as-is with a desc fallback instead of prefixing. Checked every passkey throw site on both platforms: the ?: desc fallback covers all the message-less ones (passkeyCancelled, passkeyNoPasskeys.with(cause:), passkeyFailed.with(cause:)), and code still carries the error identity. Clean — nothing new to report. Woof!
One earlier 🟢 still stands (not re-posting inline, the threads aren't coming back from the API): iOS and Android send different codes for the same condition — cancellation is S110002 vs K110002, passkeyFailed is S110001 vs K110001. Inherited from the vendored SDKs, same split flows already ship, but worth a README note since src/types.ts points callers at passkeyCancelled.
Declared coverage: PARTIAL — 2/14 changed files reviewed.
Related Issues
Fixes https://github.com/descope/etc/issues/5336
Description
descope.passkeywithisSupported,signUp,signIn,signUpOrInandadd, matching the passkey API in the native Swift, Kotlin and Flutter SDKs@descope/core-js-sdkto2.67.1, which allows the emptyoriginthat native clients sendMust