调整文件结构;跑通admin端;初步设计页面结构
This commit is contained in:
@@ -3,14 +3,19 @@ import { SUPA_URL, SUPA_KEY } from '@/ak/config.uts'
|
||||
|
||||
const supa = new AkSupa(SUPA_URL, SUPA_KEY)
|
||||
|
||||
// Do not perform hard-coded auto sign-in during page preload (development mode may preload pages).
|
||||
// Instead, mark supa as ready if an existing session is present; otherwise defer sign-in to explicit user action.
|
||||
const supaReady: Promise<boolean> = (async () => {
|
||||
try {
|
||||
// await supa.signIn('akoo@163.com', 'Hf2152111')
|
||||
await supa.signIn('am@163.com', 'kookoo')
|
||||
return true
|
||||
const sess = supa.getSession();
|
||||
if (sess != null && sess.session != null) {
|
||||
return true;
|
||||
}
|
||||
// No session found — do not auto sign-in with hard-coded credentials.
|
||||
return true;
|
||||
} catch (err) {
|
||||
console.error('Supabase auto sign-in failed', err)
|
||||
return false
|
||||
console.error('Supabase instance init failed', err)
|
||||
return false;
|
||||
}
|
||||
})()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user