Supabase
Supabase is a cloud-based platform for building scalable and secure backend applications.
First we have to start the supabase
Future<void> main() async {
await Supabase.initialize(
url: 'https://xyzcompany.supabase.co',
anonKey: 'public-anon-key',
);
runApp(MyApp());
}
// Get a reference your Supabase client
final supabase = Supabase.instance.client;SignUp a user
// create email account
Future<void> createAccountEmail(String email, String password,
{Function(AuthException)? onError}) async {
try {
final response = await _supabaseClient.auth.signUp(
email: email,
password: password,
);
final session = response.session;
final user = response.user;
} on AuthException catch (error) {
//error
onError?.call(error);
}LogIn a user
Verify if the account is created
LogOut
Last updated