de9a8606ab
Implement full OAuth 2.0 flow for Google Calendar, including token exchange, refresh, and status checks. Add UI for connecting, syncing, and disconnecting Google accounts in the Calendar panel. Additionally: - Make mobile station selection async with error handling and alerts - Add HAFAS LocMatch method to API client for finding nearest station - Expose Google OAuth env vars in Next.js config
26 lines
832 B
TypeScript
26 lines
832 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
allowedDevOrigins: ['100.107.92.66'],
|
|
serverExternalPackages: ["node-ical"],
|
|
env: {
|
|
CORS_ALLOWED_ORIGINS: process.env.CORS_ALLOWED_ORIGINS,
|
|
DEPLOYMENT_URL: process.env.DEPLOYMENT_URL,
|
|
GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
|
|
GOOGLE_REDIRECT_URI: process.env.GOOGLE_REDIRECT_URI,
|
|
},
|
|
};
|
|
|
|
// Validate environment variables at build time
|
|
if (process.env.NODE_ENV === 'production' && !process.env.SKIP_ENV_VALIDATION) {
|
|
if (!process.env.CORS_ALLOWED_ORIGINS) {
|
|
throw new Error('Missing CORS_ALLOWED_ORIGINS environment variable in production');
|
|
}
|
|
if (!process.env.DEPLOYMENT_URL) {
|
|
throw new Error('Missing DEPLOYMENT_URL environment variable in production');
|
|
}
|
|
}
|
|
|
|
export default nextConfig;
|