Auth0 provides authentication and authorization for Dyeink. You’ll need to configure both a Single Page Application (SPA) for the frontend and a Machine-to-Machine application for backend API verification.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/subratomandal/dyeink/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- An Auth0 account (sign up at auth0.com)
- Access to your Dyeink source code and environment files
Create Auth0 Application
Create a new application
- Log in to your Auth0 dashboard
- Navigate to Applications > Applications
- Click Create Application
- Name it “Dyeink” (or your preferred name)
- Select Single Page Web Applications
- Click Create
Configure application settings
In the application settings, configure the following URLs:Allowed Callback URLs:Allowed Logout URLs:Allowed Web Origins:
Create API Definition
Create a new API
- In the Auth0 dashboard, navigate to Applications > APIs
- Click Create API
- Name it “Dyeink API”
- Set the identifier to
https://api.dyeink.com - Leave signing algorithm as RS256
- Click Create
Set Up Management API Access
The Management API is required for advanced user management and metadata operations.Create a Machine-to-Machine application
- Navigate to Applications > Applications
- Click Create Application
- Name it “Dyeink Management”
- Select Machine to Machine Applications
- Click Create
Authorize the Management API
- Select Auth0 Management API from the dropdown
- Grant the following scopes:
read:usersupdate:usersread:user_idp_tokens
- Click Authorize
Configure Social Logins
Enable social connections
- Navigate to Authentication > Social
- Choose your desired providers (Google, GitHub, Twitter, etc.)
- Click on each provider to configure
Configure Google (example)
- Create a project in Google Cloud Console
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
https://your-tenant.auth0.com/login/callback - Copy Client ID and Client Secret to Auth0
- Enable the connection for your Dyeink application
Environment Configuration
Frontend (platform/.env)
Backend (backend/.env)
Root (.env)
Verification
Test your Auth0 configuration:Test frontend authentication
- Start your frontend development server
- Navigate to the login page
- Verify the Auth0 Universal Login appears
- Test login with username/password and social providers
Test API authentication
Make a request to a protected API endpoint:You should receive a valid response, not a 401 Unauthorized.
Verify token contents
Decode your JWT at jwt.io to verify:
audmatches your API identifierissmatches your Auth0 domain- Token expiration is appropriate
Security Best Practices
Troubleshooting
401 Unauthorized errors
401 Unauthorized errors
Callback URL mismatch
Callback URL mismatch
- Confirm callback URLs in Auth0 match your application URLs exactly
- Check for trailing slashes (they matter)
- Verify protocol (http vs https)
- Clear browser cache and cookies
Social login not working
Social login not working
Next Steps
MongoDB Setup
Configure your MongoDB database for data persistence
Storage Setup
Set up Cloudflare R2 for media storage

