From 30f34d2cff1ed630ead81c90eef523a4d2baaab8 Mon Sep 17 00:00:00 2001 From: hzm <934585316@qq.com> Date: Fri, 6 Feb 2026 17:41:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8A=E4=BC=A0=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/supabase.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/lib/supabase.js diff --git a/app/lib/supabase.js b/app/lib/supabase.js new file mode 100644 index 0000000..6e63f63 --- /dev/null +++ b/app/lib/supabase.js @@ -0,0 +1,17 @@ +import { createClient } from '@supabase/supabase-js'; + +// Supabase 配置 +// 注意:此处使用 publishable key,可安全在客户端使用 +const supabaseUrl = 'https://mouvsqlmgymsaxikvqsh.supabase.co/auth/v1/otp'; +const supabaseAnonKey = 'sb_publishable_c5f58knbVz8UgOh6L88MUQ_p9j8c1Q-'; + +export const supabase = createClient(supabaseUrl, supabaseAnonKey, { + auth: { + // 启用自动刷新 token + autoRefreshToken: true, + // 持久化 session 到 localStorage + persistSession: true, + // 检测 URL 中的 session(用于邮箱验证回调) + detectSessionInUrl: true + } +});