feat: Add React Native Web Support for Auth0 with Class-Based Implementation #1221
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Overview
This PR adds full React Native Web (RN Web) support to the react-native-auth0 library by implementing web-specific versions of all core Auth0 classes using the
@auth0/auth0-spa-js
library.🚀 What's New
📦 New Web Implementation Files
src/auth0/index.web.ts
- Main Auth0 client with automatic redirect handlingsrc/auth/index.web.ts
- Auth class with secure SPA-focused methodssrc/webauth/index.web.ts
- WebAuth class supporting redirect-based flowssrc/credentials-manager/index.web.ts
- Credentials manager using auth0-spa-js token managementsrc/management/users.web.ts
- Management API client for user operationssrc/specs/NativeA0Auth0.web.ts
- Web-compatible native module spec🔧 Key Features
🛠️ Implementation Highlights
@auth0/auth0-spa-js
v2.2.0 as the underlying web client📋 Updated Dependencies
@auth0/auth0-spa-js: ^2.2.0
as peer dependency to support web authentication flows🎯 Benefits
🧪 Testing