Skip to content

Bind the React Native authentication package to native DiditAuth - #63

Open
botinc-agent[bot] wants to merge 1 commit into
mainfrom
botinc/run-7bef14c2
Open

botinc-agent[bot] wants to merge 1 commit into
mainfrom
botinc/run-7bef14c2

Conversation

@botinc-agent

@botinc-agent botinc-agent Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

@didit-protocol/auth-react-native now calls native DiditAuth instead of rejecting every call. It replaces the placeholder boundary from #62.

  • JavaScript API: createDiditAuth({ publishableKey, redirectUri }) returns signIn, signInWithPasskey, registerPasskey, currentSession({ force }), getToken, signOut and stepUp({ action }). redirectUri is a required HTTPS address; native DiditAuth validates it.
  • Android: the Kotlin module creates one DiditAuth(context, publishableKey, redirectUri) per application and calls its suspend methods with the foreground activity. It depends on me.didit:didit-auth.
  • iOS: a Swift bridge calls the async throwing methods with the presenting view controller. It depends on DiditSDK/Auth (CocoaPods) or the DiditAuth product of sdk-ios (SwiftPM).
  • Errors: native codes (cancelled, invalid_state, not_signed_in, passkey_cancelled, passkey_unavailable, browser_unavailable, rate_limited and the API's own) reach JavaScript unchanged as DiditAuthError, with status, fields and retryAfter when present. Without the native module, every call rejects with ERR_DIDIT_AUTH_UNAVAILABLE.
  • Native pins: both packages pin native SDK 4.10.0, the first release with DiditAuth, so one app can link both. The source pin moves to the merged native revision. The local source build now also publishes didit-signals and didit-auth.
  • The package stays private and unpublished.

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:

Job Failure Cause
Released Android compatibility Could not find me.didit:didit-sdk:4.10.0 and me.didit:didit-auth:4.10.0 The sdk-android Maven repository stops at 4.9.1 and has no didit-auth or didit-signals
Released iOS compatibility and bridge tests Swift Package Manager resolves no package, so Xcode builds 1 target instead of 80; then module maps and React are missing sdk-ios has no 4.10.0 tag

No code change can fix this: didit-auth exists 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 lint
  • yarn test --runInBand: 17 suites, 158 tests passed
  • yarn prepare, yarn build:auth, yarn workspace @didit-protocol/auth-react-native pack --dry-run
  • yarn native:android with DIDIT_SDK_SOURCE_PATH at the pinned native revision: built and published didit-auth 4.10.0 and the other modules locally (JDK 17, Android SDK 36)
  • In 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 DiditAuth

Not verified yet

  • Builds against released artifacts: both CI jobs, after the 4.10.0 release.
  • iOS: the Swift bridge has not been compiled; it needs a Mac. Run the iOS CI job after the release, or build the example with DIDIT_SDK_SOURCE_PATH set to the pinned native revision.
  • Example Podfile.lock: regenerate it on macOS.
  • Sign-in round trips: not exercised on a device or simulator (hosted page, passkeys, sign-out, step-up). They need an application with an HTTPS redirect, its App Link or associated domain, and the authentication service on staging.
  • Release tag: the podspec's auth-react-native-v* tag is a placeholder until the package is published.

Flutter

sdk-flutter has no didit_auth package; 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

…ind to the shipped native DiditAuth API

Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
@botinc-agent botinc-agent Bot changed the title DID-7085: [SDKA6b] React Native and Flutter Authentication wrappers bind to the shipped native DiditAuth API Bind the React Native authentication package to native DiditAuth Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant