db(couchdb): auto-provision databases on startup for production strategy; add TokenService with CouchDB-backed token storage and localStorage fallback; switch OAuth to unified config for client IDs and redirect URI; express Request typing for req.user; align exportAsEnvVars with show-config expectations; remove Vite importmap from index.html; prefer babel-jest over ts-jest; remove duplicate uuid mocking from Jest config
This commit is contained in:
@@ -4,9 +4,12 @@ import {
|
||||
navigationService,
|
||||
} from './navigation/navigation.interface';
|
||||
|
||||
import { getAppConfig, getOAuthConfig } from '../config/unified.config';
|
||||
|
||||
// Mock OAuth configuration
|
||||
const GOOGLE_CLIENT_ID = 'mock_google_client_id';
|
||||
const GITHUB_CLIENT_ID = 'mock_github_client_id';
|
||||
const { google, github } = getOAuthConfig();
|
||||
const GOOGLE_CLIENT_ID = google?.clientId || 'mock_google_client_id';
|
||||
const GITHUB_CLIENT_ID = github?.clientId || 'mock_github_client_id';
|
||||
|
||||
// Mock OAuth endpoints
|
||||
const GOOGLE_AUTH_URL = 'https://accounts.google.com/o/oauth2/v2/auth';
|
||||
@@ -17,7 +20,8 @@ const GOOGLE_SCOPES = 'openid email profile';
|
||||
const GITHUB_SCOPES = 'user:email';
|
||||
|
||||
// Mock redirect URI
|
||||
const REDIRECT_URI = 'http://localhost:3000/auth/callback';
|
||||
const APP_BASE_URL = getAppConfig().baseUrl;
|
||||
const REDIRECT_URI = `${APP_BASE_URL.replace(/\/$/, '')}/auth/callback`;
|
||||
|
||||
// Mock OAuth state generation
|
||||
const generateState = () => crypto.randomUUID();
|
||||
|
||||
Reference in New Issue
Block a user