Reputation: 418
I am learning to use supabase for my backend and I see that there is a lot of examples of how to add new users using the dart package supabase
[docs]. However, I wanted to know how I can add new users (using their email and password) using the flutter package supabase_flutter
docs. (Email confirmation has been turned off)
The docs include authentication examples, but I cant find how to sign up new users using this package. Is this meant to be a package used alongside the supabase dart package to make code cleaner for certain features or is it an alternative?
Upvotes: 0
Views: 477
Reputation: 18612
supabase_flutter
is an alternative of supabase
package when you want to develop Flutter applications using Supabase. When you are using supabase_flutter
, you don't need to include supabase
in your pubspec.yaml.
Using supabase_flutter
, you can sign up users like this:
final supabase = Supabase.instance.client;
final res = await supabase.auth.signUp('[email protected]', 'example-password');
final user = res.data?.user;
final error = res.error;
You can read more on the official docs here.
Sorry for the confusion there. We are in the process of rearranging things to make it more obvious for the developer to use supabase_flutter
when developing Flutter applications.
Upvotes: 2