WIP 955948ed
Steve · 2024-09-20 06:54 2 file(s) · +9 −5
src/components/SignInButton.tsx +4 −5
2 2
3 3
export function SignInButton() {
4 4
	async function signInWithGithub() {
5 -
		const { data, error } = await supabase.auth.signInWithOAuth({
5 +
		await supabase.auth.signInWithOAuth({
6 6
			provider: "github",
7 +
			options: {
8 +
				redirectTo: "https://stevedylan.dev/auth/callback",
9 +
			},
7 10
		});
8 -
		if (error) {
9 -
			console.log(error);
10 -
		}
11 -
		console.log(data);
12 11
	}
13 12
14 13
	return (
src/lib/supabase.ts +5 −0
3 3
export const supabase = createClient(
4 4
	import.meta.env.PUBLIC_SUPABASE_URL,
5 5
	import.meta.env.PUBLIC_SUPABASE_ANON_KEY,
6 +
	{
7 +
		auth: {
8 +
			flowType: "pkce",
9 +
		},
10 +
	},
6 11
);