diff --git a/convex/auth.ts b/convex/auth.ts index 64ad900..4fd8944 100644 --- a/convex/auth.ts +++ b/convex/auth.ts @@ -51,6 +51,16 @@ export const createAuthOptions = ( }); }, }, + socialProviders: { + google: { + clientId: process.env.GOOGLE_CLIENT_ID!, + clientSecret: process.env.GOOGLE_CLIENT_SECRET!, + }, + github: { + clientId: process.env.GITHUB_CLIENT_ID!, + clientSecret: process.env.GITHUB_CLIENT_SECRET!, + }, + }, plugins: [convex({ authConfig }), haveIBeenPwned()], }; }; diff --git a/messages/en.json b/messages/en.json index 5cfe09d..b979713 100644 --- a/messages/en.json +++ b/messages/en.json @@ -17,6 +17,9 @@ "ShowPasswordTooltip": "Show password", "Submit": "Submit", "CheckYourEmail": "Check your email to complete the process.", + "SignInWithGoogle": "Sign in with Google", + "SignInWithGitHub": "Sign in with GitHub", + "OrContinueWith": "or continue with", "ForgotPasswordLink": "Forgot password?", "ForgotPasswordTitle": "Forgot password", "SendResetLink": "Send reset link", diff --git a/messages/pl.json b/messages/pl.json index 2404e60..6ab9592 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -17,6 +17,9 @@ "ShowPasswordTooltip": "Pokaż hasło", "Submit": "Wyślij", "CheckYourEmail": "Sprawdź email, aby dokończyć proces.", + "SignInWithGoogle": "Zaloguj się przez Google", + "SignInWithGitHub": "Zaloguj się przez GitHub", + "OrContinueWith": "lub kontynuuj przez", "ForgotPasswordLink": "Nie pamiętasz hasła?", "ForgotPasswordTitle": "Nie pamiętasz hasła", "SendResetLink": "Wyślij link resetujący", diff --git a/src/components/auth/AuthForm.tsx b/src/components/auth/AuthForm.tsx index 04a9716..9e3385e 100644 --- a/src/components/auth/AuthForm.tsx +++ b/src/components/auth/AuthForm.tsx @@ -38,6 +38,8 @@ import { TooltipTrigger, } from '@/components/ui/tooltip'; +import { Separator } from '@/components/ui/separator'; + import { Spinner } from '../ui/spinner'; const signInSchema = z.object({ @@ -119,6 +121,39 @@ export function AuthForm({ mode, redirectPath = '/dashboard' }: AuthFormProps) { +
+ + +
+
+ + + {t('OrContinueWith')} + + +
{isSignUp && (