diff --git a/apps/docs/content/guides/auth/passwords.mdx b/apps/docs/content/guides/auth/passwords.mdx index 363b86c6400..cfde4e71b7c 100644 --- a/apps/docs/content/guides/auth/passwords.mdx +++ b/apps/docs/content/guides/auth/passwords.mdx @@ -643,6 +643,18 @@ client.auth.reset_password_email( ) ``` + + +<$Show if="sdk:dart"> + + +```dart +await supabase.auth.resetPasswordForEmail( + 'valid.email@supabase.io', + redirectTo: 'http://example.com/account/update-password', +); +``` + @@ -937,6 +949,15 @@ supabase.gotrue.sendRecoveryEmail( supabase.auth.reset_password_email('valid.email@supabase.io') ``` + + +<$Show if="sdk:dart"> + + +```dart +await supabase.auth.resetPasswordForEmail('valid.email@supabase.io'); +``` + @@ -992,6 +1013,17 @@ supabase.auth.updateUser { supabase.auth.update_user({'password': 'new_password'}) ``` + + +<$Show if="sdk:dart"> + + +```dart +final UserResponse res = await supabase.auth.updateUser( + UserAttributes(password: 'new_password'), +); +``` + @@ -1098,6 +1130,18 @@ supabase.auth.sign_up({ }) ``` + + +<$Show if="sdk:dart"> + + +```dart +final AuthResponse res = await supabase.auth.signUp( + phone: '+13334445555', + password: 'some-password', +); +``` + @@ -1187,6 +1231,21 @@ supabase.auth.verify_otp({ }) ``` + + +<$Show if="sdk:dart"> + + +You should present a form to the user so they can input the 6 digit pin, then send it along with the phone number to `verifyOTP`: + +```dart +final AuthResponse res = await supabase.auth.verifyOTP( + phone: '+13334445555', + token: '123456', + type: OtpType.sms, +); +``` + @@ -1259,11 +1318,23 @@ supabase.auth.signInWith(Phone) { ```python supabase.auth.sign_in_with_password({ - 'phone': "+13334445555" + 'phone': "+13334445555", 'password': "some-password" }) ``` + + +<$Show if="sdk:dart"> + + +```dart +final AuthResponse res = await supabase.auth.signInWithPassword( + phone: '+13334445555', + password: 'some-password', +); +``` +