Repository navigation
Bind the React Native authentication package to native DiditAuth - #63
Conversation
…ind to the shipped native DiditAuth API Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
…o native 4.12.2 Native 4.12.2 is released with DiditAuth (sdk-ios tag, sdk-android repository didit-auth and didit-signals), so the temporary source pin is dropped and the auth package pins the same release as the verification package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codex review ( 💡 Code reviewReviewed commit:
When an iPad or multi-window app has multiple connected scenes, Verdict: APPROVE |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Status after taking this over (not merged yet). The blocker in the description is gone: native 4.12.2 is released with DiditAuth (sdk-ios tag 4.12.2 with DiditAuth.xcframework.zip, sdk-android repository carries didit-auth and didit-signals 4.12.2), and the Android and Swift bridges match the current native DiditAuth API in mobile-sdks main. Pushed: merge of main (took main's release pins and dropped the temporary source pin), the auth package pinned to 4.12.2, a CONTRIBUTING note to bump both pins together, and a fix to the native Android build test that read the removed source pin. Local review verdict: APPROVE. CI on the head: lint, test, build-library and Released Android compatibility pass. Remaining red: Released iOS compatibility and bridge tests. xcodebuild stops after about 50 s with 'module map file ... DiditAuthReactNative.modulemap / SdkReactNative.modulemap not found' and 'no such module React'. The SwiftPM checksums for DiditAuth, DiditSDK and DiditSDK-Signals match the released assets, so it is not a bad release asset. Suspect: with $DiditSdkIosLinkage = 'spm' the example links both the DiditSDK product (whose module already contains the DiditAuth types) and the separate DiditAuth product, which needs a reproduction in Xcode on a Mac. Left open for that. |
Native 4.13.0 is released and main is on it, so the authentication package's pins and README move with it (CONTRIBUTING: both pins together). The iOS example failed with 'module map file ... not found' and 'no such module React' because Xcode could not open Pods.xcodeproj. CocoaPods numbers the project's objects with a counter that restarts at 0 once its last batch of 100 is used up exactly; with the Swift sources of the auth pod the project lands on that boundary, so React Native's spm_dependency gave the SwiftPM package reference the UUID of an existing object. The Podfile now hands the post-install step random UUIDs. Behind that, DiditAuthReactNative.mm called signInWithPublishableKey: but Swift exports signIn(publishableKey:) as signInPublishableKey:, so the selector is now named explicitly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codex review ( 💡 Code reviewReviewed commit:
When an iPadOS or multi-window iOS application has multiple connected scenes, the first scene is not necessarily foreground-active or the one containing the key window. Selecting Verdict: APPROVE |
Summary
@didit-protocol/auth-react-nativenow calls native DiditAuth instead of rejecting every call. It replaces the placeholder boundary from #62.createDiditAuth({ publishableKey, redirectUri })returnssignIn,signInWithPasskey,registerPasskey,currentSession({ force }),getToken,signOutandstepUp({ action }).redirectUriis a required HTTPS address; native DiditAuth validates it.DiditAuth(context, publishableKey, redirectUri)per application and calls its suspend methods with the foreground activity. It depends onme.didit:didit-auth.DiditSDK/Auth(CocoaPods) or theDiditAuthproduct of sdk-ios (SwiftPM).cancelled,invalid_state,not_signed_in,passkey_cancelled,passkey_unavailable,browser_unavailable,rate_limitedand the API's own) reach JavaScript unchanged asDiditAuthError, withstatus,fieldsandretryAfterwhen present. Without the native module, every call rejects withERR_DIDIT_AUTH_UNAVAILABLE.didit-signalsanddidit-auth.Status: not ready, waiting for the native 4.10.0 release
The two native CI jobs fail on this PR and pass on
main. Both build the example against released native binaries, and 4.10.0 has not been released yet:Could not find me.didit:didit-sdk:4.10.0andme.didit:didit-auth:4.10.0didit-authordidit-signalsReactare missingNo code change can fix this:
didit-authexists in no released version, and the verification package must use the same native version as the authentication package (CocoaPods and SwiftPM resolve one DiditSDK version per app). Once sdk-android and sdk-ios carry 4.10.0, re-run both jobs on this head.Verification
Run locally on this head; every command exited 0:
yarn typecheck,yarn lintyarn test --runInBand: 17 suites, 158 tests passedyarn prepare,yarn build:auth,yarn workspace @didit-protocol/auth-react-native pack --dry-runyarn native:androidwithDIDIT_SDK_SOURCE_PATHat the pinned native revision: built and publisheddidit-auth4.10.0 and the other modules locally (JDK 17, Android SDK 36)example/android, against those artifacts:./gradlew :didit-protocol_auth-react-native:compileDebugKotlin :didit-protocol_auth-react-native:compileDebugJavaWithJavac :didit-protocol_sdk-react-native:compileDebugKotlin./gradlew app:assembleDebug -PreactNativeArchitectures=arm64-v8a: BUILD SUCCESSFUL. The debug APK contains the React Native module and native DiditAuthNot verified yet
DIDIT_SDK_SOURCE_PATHset to the pinned native revision.auth-react-native-v*tag is a placeholder until the package is published.Flutter
sdk-flutter has no
didit_authpackage; it needs its own package and pull request in that repository. That work also needs the 4.10.0 release, and this pull request does not change Flutter.No screens change, so there are no screenshots.
🤖 Generated with Claude Code