docs: add missing Dart examples (#39815)

This commit is contained in:
Guilherme Souza authored and GitHub committed 2025-10-24 05:26:04 -03:00
1 parent 7ade636a79
commit c73296e549
1 file changed
+72 -1
+72 -1
View File
@@ -643,6 +643,18 @@ client.auth.reset_password_email(
)
```
</TabPanel>
</$Show>
<$Show if="sdk:dart">
<TabPanel id="dart" label="Dart">
```dart
await supabase.auth.resetPasswordForEmail(
'valid.email@supabase.io',
redirectTo: 'http://example.com/account/update-password',
);
```
</TabPanel>
</$Show>
</Tabs>
@@ -937,6 +949,15 @@ supabase.gotrue.sendRecoveryEmail(
supabase.auth.reset_password_email('valid.email@supabase.io')
```
</TabPanel>
</$Show>
<$Show if="sdk:dart">
<TabPanel id="dart" label="Dart">
```dart
await supabase.auth.resetPasswordForEmail('valid.email@supabase.io');
```
</TabPanel>
</$Show>
</Tabs>
@@ -992,6 +1013,17 @@ supabase.auth.updateUser {
supabase.auth.update_user({'password': 'new_password'})
```
</TabPanel>
</$Show>
<$Show if="sdk:dart">
<TabPanel id="dart" label="Dart">
```dart
final UserResponse res = await supabase.auth.updateUser(
UserAttributes(password: 'new_password'),
);
```
</TabPanel>
</$Show>
</Tabs>
@@ -1098,6 +1130,18 @@ supabase.auth.sign_up({
})
```
</TabPanel>
</$Show>
<$Show if="sdk:dart">
<TabPanel id="dart" label="Dart">
```dart
final AuthResponse res = await supabase.auth.signUp(
phone: '+13334445555',
password: 'some-password',
);
```
</TabPanel>
</$Show>
<TabPanel id="http" label="HTTP">
@@ -1187,6 +1231,21 @@ supabase.auth.verify_otp({
})
```
</TabPanel>
</$Show>
<$Show if="sdk:dart">
<TabPanel id="dart" label="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,
);
```
</TabPanel>
</$Show>
<TabPanel id="http" label="HTTP">
@@ -1259,11 +1318,23 @@ supabase.auth.signInWith(Phone) {
```python
supabase.auth.sign_in_with_password({
'phone': "+13334445555"
'phone': "+13334445555",
'password': "some-password"
})
```
</TabPanel>
</$Show>
<$Show if="sdk:dart">
<TabPanel id="dart" label="Dart">
```dart
final AuthResponse res = await supabase.auth.signInWithPassword(
phone: '+13334445555',
password: 'some-password',
);
```
</TabPanel>
</$Show>
<TabPanel id="http" label="HTTP">