이메일/패스워드 인증
import { createClient } from "@supabase/supabase-js";
const supabase = createClient(URL, ANON_KEY);
// 회원가입
const { data, error } = await supabase.auth.signUp({
email: "user@example.com",
password: "secure-password",
});
// 로그인
const { data } = await supabase.auth.signInWithPassword({
email: "user@example.com",
password: "secure-password",
});OAuth 로그인
await supabase.auth.signInWithOAuth({
provider: "google",
options: { redirectTo: "http://localhost:3000/callback" },
});RLS와 결합하면 행 수준 보안이 자동으로 적용됩니다.
댓글 0