Reclaim OAuthReclaim Auth - React
Overview
Get up and running with Reclaim Auth React in your application quickly.
Important Notes
Current Implementation Details
- Authentication Flow: Currently uses popup-based authentication (redirect-based flow in development)
- Security Protocol: Implements Authorization Code Grant for secure authentication
- Security Requirements:
- Redirect URI is mandatory for security verification
- Authentication occurs in a secure popup window with automatic closure
- PKCE (Proof Key for Code Exchange) implementation planned for enhanced security
Create Your Application
Step 1: Access Dashboard
Navigate to the Reclaim Identity Dashboard
Step 2: Initialize Application
Click "Create New Application"
Step 3: Configure Settings
Complete the following configuration sections:
-
Basic Information
- Enter your application's core details (name, description)
-
Identity Providers
- Select authentication methods (e.g., Google, Email)
- These determine user login options in the auth popup
-
Additional Providers
- Configure extra data collection requirements
- Users will generate proofs for each selected provider
-
Redirect URIs
- Add authorized callback URLs:
-
Development:
http://localhost:3000
-
Production:
https://yourdomain.com
-
Security Note: Redirect URIs are mandatory security components, even with popup-based flow.
- Add authorized callback URLs:
Step 4: Save Credentials
After creation, securely store your:
- Application ID (clientId)
- Application Secret (clientSecret)
Implementation Guide
Installation
Environment Configuration
Create a .env
file in your project root with these required variables:
Basic Implementation Example
Here's a minimal implementation demonstrating core authentication functionality:
Testing Procedure
- Launch Development Server
- Access Application
- Open
http://localhost:3000
- Click "Sign In"
- Complete authentication in popup
- Verify user information display
Troubleshooting Guide
1. Popup Blocking Issues
Solution:
- Enable popups for your application domain
- Ensure sign-in is triggered by user interaction
- Avoid automatic popup triggers
2. Redirect URI Errors
Solution:
- Verify exact URI match in dashboard and environment variables
- Check for:
- Trailing slashes
- Correct protocol (http/https)
- Proper domain spelling
3. CORS Configuration
Solution:
- Verify domain whitelist in dashboard
- Confirm environment URL accuracy
- Check redirect URI authorization