feat(auth): restore Google sign-in and AI admin test routes
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>
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { LoginForm } from '@/components/login-form';
|
||||
import { getSystemConfig } from '@/lib/config';
|
||||
import { isGoogleAuthEnabled } from '@/lib/auth-providers';
|
||||
|
||||
export default async function LoginPage() {
|
||||
const config = await getSystemConfig();
|
||||
const allowRegister = config.ALLOW_REGISTRATION !== 'false' && process.env.ALLOW_REGISTRATION !== 'false';
|
||||
|
||||
return <LoginForm allowRegister={allowRegister} />;
|
||||
return (
|
||||
<LoginForm
|
||||
allowRegister={allowRegister}
|
||||
googleAuthEnabled={isGoogleAuthEnabled()}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
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() {
|
||||
@@ -10,5 +11,5 @@ export default async function RegisterPage() {
|
||||
redirect('/login');
|
||||
}
|
||||
|
||||
return <RegisterForm />;
|
||||
return <RegisterForm googleAuthEnabled={isGoogleAuthEnabled()} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user