[dyad] Added OpenID Connect for Pocket ID - wrote 1 file(s)

This commit is contained in:
[dyad]
2026-01-30 09:10:14 +01:00
parent 19a237df5d
commit a872525b1e

View File

@@ -5,6 +5,8 @@ import { Auth } from "@supabase/auth-ui-react";
import { ThemeSupa } from "@supabase/auth-ui-shared";
import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { Button } from "@/components/ui/button";
import { KeyRound } from "lucide-react";
export default function LoginPage() {
const router = useRouter();
@@ -19,6 +21,12 @@ export default function LoginPage() {
return () => subscription.unsubscribe();
}, [router]);
const handleOidcSignIn = async () => {
await supabase.auth.signInWithOAuth({
provider: 'pocket_id',
});
};
return (
<div className="flex items-center justify-center min-h-screen bg-background">
<div className="w-full max-w-md p-8 space-y-8">
@@ -34,6 +42,20 @@ export default function LoginPage() {
view="sign_in"
showLinks={false}
/>
<div className="relative">
<div className="absolute inset-0 flex items-center">
<span className="w-full border-t" />
</div>
<div className="relative flex justify-center text-xs uppercase">
<span className="bg-background px-2 text-muted-foreground">
Or continue with
</span>
</div>
</div>
<Button variant="outline" className="w-full" onClick={handleOidcSignIn}>
<KeyRound className="mr-2 h-4 w-4" />
Sign in with Pocket ID
</Button>
</div>
</div>
);