当用户登录时,使用其电子邮件地址和密码调用signInWithPassword():
async function signInWithEmail() {
const { data, error } = await supabase.auth.signInWithPassword({
email: 'example@email.com',
password: 'example-password',
})
}
当用户登录时,使用其电子邮件地址和密码调用signInWithPassword():
Future<void> signInWithEmail() async {
final AuthResponse res = await supabase.auth.signInWithPassword(
email: 'example@email.com',
password: 'example-password'
);
}
当用户注销时,调用signOut()将其从浏览器会话和localStorage中删除:
async function signOut() {
const { error } = await supabase.auth.signOut()
}
当用户注销时,调用signOut()将其从浏览器会话和localStorage中删除:
Future<void> signOut() async {
await supabase.auth.signOut();
}