Google OAuth was implemented locally but never deployed; the login button only renders when AUTH_GOOGLE_ID and AUTH_GOOGLE_SECRET are set. Also restores /api/ai/test-* endpoints removed by mistake and wires Google credentials into deploy workflows. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
535 B
TypeScript
16 lines
535 B
TypeScript
import { RegisterForm } from '@/components/register-form';
|
|
import { getSystemConfig } from '@/lib/config';
|
|
import { isGoogleAuthEnabled } from '@/lib/auth-providers';
|
|
import { redirect } from 'next/navigation';
|
|
|
|
export default async function RegisterPage() {
|
|
const config = await getSystemConfig();
|
|
const allowRegister = config.ALLOW_REGISTRATION !== 'false' && process.env.ALLOW_REGISTRATION !== 'false';
|
|
|
|
if (!allowRegister) {
|
|
redirect('/login');
|
|
}
|
|
|
|
return <RegisterForm googleAuthEnabled={isGoogleAuthEnabled()} />;
|
|
}
|