forked from vercel/nextjs-subscription-payments
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAuthUI.tsx
32 lines (30 loc) · 790 Bytes
/
AuthUI.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'use client';
import { useSupabase } from '@/app/supabase-provider';
import { getURL } from '@/utils/helpers';
import { Auth } from '@supabase/auth-ui-react';
import { ThemeSupa } from '@supabase/auth-ui-shared';
export default function AuthUI() {
const { supabase } = useSupabase();
return (
<div className="flex flex-col space-y-4">
<Auth
supabaseClient={supabase}
providers={['github']}
redirectTo={`${getURL()}/auth/callback`}
magicLink={true}
appearance={{
theme: ThemeSupa,
variables: {
default: {
colors: {
brand: '#404040',
brandAccent: '#52525b'
}
}
}
}}
theme="dark"
/>
</div>
);
}