-
Notifications
You must be signed in to change notification settings - Fork 232
feat: add support for Native to Web SSO #1386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…into feat/native-to-web-sso
|
Claude finished @pmathew92's task —— View job Code Review Complete
Overall Assessment❌ This pull request requires fixes before it can be merged. A critical compilation error was identified in the Android implementation that will prevent the code from building, along with several type safety issues that could cause runtime failures. Critical Issues:
Additional Issues:
The TypeScript/React implementation, iOS native implementation, and test coverage are well-structured. Once the critical Android issues are resolved, this will be a solid addition to the library. |
…into feat/native-to-web-sso
…into feat/native-to-web-sso
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Native to Web SSO functionality, enabling seamless authentication between native mobile apps and web contexts. The implementation allows applications to obtain session transfer credentials from native SDKs to establish authenticated web sessions without requiring user re-authentication.
- Introduces
SessionTransferCredentialstype with session transfer tokens for web SSO - Adds
getSSOCredentialsmethod across all platform-specific implementations (iOS, Android, Web) - Integrates the feature into React hooks (
useAuth0) with comprehensive test coverage for native platforms
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
src/types/common.ts |
Defines SessionTransferCredentials type with session transfer token, expiration, and optional rotated tokens |
src/specs/NativeA0Auth0.ts |
Adds TurboModule spec for getSSOCredentials native method signature |
src/platforms/web/adapters/WebCredentialsManager.ts |
Implements web adapter that throws appropriate error since SSO is native-only |
src/platforms/native/bridge/NativeBridgeManager.ts |
Implements native bridge to call native module with parameters and headers |
src/platforms/native/bridge/INativeBridge.ts |
Defines native bridge interface with comprehensive documentation |
src/platforms/native/adapters/NativeCredentialsManager.ts |
Implements credentials manager method with error handling |
src/platforms/native/adapters/__tests__/NativeCredentialsManager.spec.ts |
Adds comprehensive test coverage for all parameter combinations and error cases |
src/hooks/Auth0Provider.tsx |
Integrates getSSOCredentials into Auth0 context with error handling |
src/hooks/__tests__/Auth0Provider.spec.tsx |
Adds comprehensive test coverage for hook integration |
src/hooks/Auth0Context.ts |
Defines context interface with detailed documentation and usage examples |
src/core/interfaces/ICredentialsManager.ts |
Defines credentials manager interface with documentation |
ios/NativeBridge.swift |
Implements iOS native bridge calling credentials manager with parameters and headers |
ios/A0Auth0.mm |
Exports iOS React Native method bridging to Swift implementation |
android/src/main/oldarch/com/auth0/react/A0Auth0Spec.kt |
Adds method signature to Android old architecture spec |
android/src/main/java/com/auth0/react/A0Auth0Module.kt |
Implements Android native module with credentials manager integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@subhankarmaiti , show an example in the Examples.md file for this flow E2E |
…into feat/native-to-web-sso
…r description for iOS
Implements Native to Web SSO functionality enabling seamless authentication between native contexts and WebViews. Applications can obtain session transfer credentials from native SDKs to establish authenticated web sessions without re-authentication.
Usage