You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/spec/supabase_js_v2.yml
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1095,7 +1095,15 @@ functions:
1095
1095
title: 'verifyOtp()'
1096
1096
$ref: '@supabase/auth-js.GoTrueClient.verifyOtp'
1097
1097
notes: |
1098
-
- The `verifyOtp` method takes in different verification types. If a phone number is used, the type can either be `sms` or `phone_change`. If an email address is used, the type can be one of the following: `email`, `recovery`, `invite` or `email_change` (`signup` and `magiclink` types are deprecated).
1098
+
- The `verifyOtp` method takes in different verification types.
1099
+
- If a phone number is used, the type can either be:
1100
+
1. `sms` – Used when verifying a one-time password (OTP) sent via SMS during sign-up or sign-in.
1101
+
2. `phone_change` – Used when verifying an OTP sent to a new phone number during a phone number update process.
1102
+
- If an email address is used, the type can be one of the following (note: `signup` and `magiclink` types are deprecated):
1103
+
1. `email` – Used when verifying an OTP sent to the user's email during sign-up or sign-in.
1104
+
2. `recovery` – Used when verifying an OTP sent for account recovery, typically after a password reset request.
1105
+
3. `invite` – Used when verifying an OTP sent as part of an invitation to join a project or organization.
1106
+
4. `email_change` – Used when verifying an OTP sent to a new email address during an email update process.
1099
1107
- The verification type used should be determined based on the corresponding auth method called before `verifyOtp` to sign up / sign-in a user.
1100
1108
- The `TokenHash` is contained in the [email templates](/docs/guides/auth/auth-email-templates) and can be used to sign in. You may wish to use the hash with Magic Links for the PKCE flow for Server Side Auth. See [this guide](/docs/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr) for more details.
1101
1109
examples:
@@ -1653,7 +1661,7 @@ functions:
1653
1661
- Resends a signup confirmation, email change or phone change email to the user.
1654
1662
- Passwordless sign-ins can be resent by calling the `signInWithOtp()` method again.
1655
1663
- Password recovery emails can be resent by calling the `resetPasswordForEmail()` method again.
1656
-
- This method will only resend an email or phone OTP to the user if there was an initial signup, email change or phone change request being made.
1664
+
- This method will only resend an email or phone OTP to the user if there was an initial signup, email change or phone change request being made(note: For existing users signing in with OTP, you should use `signInWithOtp()` again to resend the OTP).
1657
1665
- You can specify a redirect url when you resend an email link using the `emailRedirectTo` option.
0 commit comments