- Add Auth0 SPA SDK integration for authentication - Create login/logout flow with Auth0 - Add user dashboard page with: - Profile display and editing - Credits balance and transaction history - API key management (create/revoke) - Account settings - Add API client for backend communication - Update navbar with Login/Dashboard buttons - Preserve existing landing page design Configuration: - Auth0 Domain: dev-t13zhs74oltgqtfxf.auth0.com - API base: /api (proxied through Caddy)
39 lines
977 B
JavaScript
39 lines
977 B
JavaScript
/**
|
|
* Moxiegen Frontend Configuration
|
|
* Update these values to match your Auth0 and API settings
|
|
*/
|
|
|
|
const CONFIG = {
|
|
// Auth0 Configuration
|
|
auth0: {
|
|
domain: 'dev-t13zhs74oltgqtfxf.auth0.com',
|
|
clientId: 'YOUR_CLIENT_ID', // Replace with your Auth0 Client ID
|
|
audience: 'https://dev-t13zhs74oltgqtfxf.auth0.com/api/v2/',
|
|
redirectUri: window.location.origin + '/dashboard.html',
|
|
logoutUri: window.location.origin
|
|
},
|
|
|
|
// API Configuration
|
|
api: {
|
|
baseUrl: '/api', // Proxied through Caddy
|
|
endpoints: {
|
|
me: '/users/me',
|
|
credits: '/users/credits',
|
|
apiKeys: '/users/api-keys',
|
|
health: '/health'
|
|
}
|
|
},
|
|
|
|
// App Configuration
|
|
app: {
|
|
name: 'Moxiegen',
|
|
version: '2.0.0'
|
|
}
|
|
};
|
|
|
|
// Freeze config to prevent modifications
|
|
Object.freeze(CONFIG);
|
|
Object.freeze(CONFIG.auth0);
|
|
Object.freeze(CONFIG.api);
|
|
Object.freeze(CONFIG.app);
|