Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: add sign in method for token hash

[email protected]3cd38a731cb7
diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.yml
index aa2337b47b5..4d9c6a4f52d 100644
--- a/spec/supabase_js_v2.yml
+++ b/spec/supabase_js_v2.yml
@@ -415,6 +415,7 @@ functions:
notes: |
- 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).
- The verification type used should be determined based on the corresponding auth method called before `verifyOtp` to sign up / sign-in a user.
+ - It is also possible to use the `TokenHash` found in the [email templates](/docs/guides/auth/auth-email-templates) as a sign in method
examples:
- id: verify-sms-one-time-password(otp)
name: Verify Sms One-Time Password (OTP)
@@ -430,6 +431,13 @@ functions:
```js
const { data, error } = await supabase.auth.verifyOtp({ email, token, type: 'email'})
```
+ - id: verify-signup-one-time-password(otp)
+ name: Verify Signup One-Time Password (OTP)
+ isSpotlight: false
+ code: |
+ ```js
+ const { data, error } = await supabase.auth.verifyOtp({ tokenHash, type: 'email'})
+ ```
- id: get-session
title: 'getSession()'
$ref: '@supabase/gotrue-js.GoTrueClient.getSession'