mirror of
https://github.com/exchanges-lab/view.git
synced 2026-08-04 21:31:22 +08:00
619391f87a
- Add build.sh that generates auth-config.js from environment variables (API_BASE_URL, GOOGLE_CLIENT_ID, ALLOWED_EMAILS) at build time - Move email whitelist from hardcoded login.html to window.ALLOWED_EMAILS in auth-config.js, so it can be configured via env vars - Reset auth-config.js to placeholder defaults in repo - Update README.md and README_CN.md deployment docs for both options Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15 lines
422 B
JavaScript
15 lines
422 B
JavaScript
window.API_CONFIG = { baseUrl: 'https://xxx.xxx.com' };
|
|
|
|
const AUTH_CONFIG = {
|
|
clientId: 'xxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com',
|
|
onSuccess: (user) => {
|
|
console.log('Authentication successful:', user.email);
|
|
},
|
|
onError: (error) => {
|
|
console.error('Authentication error:', error);
|
|
}
|
|
};
|
|
|
|
window.AUTH_CONFIG = AUTH_CONFIG;
|
|
window.ALLOWED_EMAILS = ['your-email@gmail.com'];
|