The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix docs for getuser and getsession
Inianbe6306430c1c
diff --git a/apps/reference/_supabase_js/generated/auth-getsession.mdx b/apps/reference/_supabase_js/generated/auth-getsession.mdxindex 0a490a10c04..ce751ce0b5d 100644--- a/apps/reference/_supabase_js/generated/auth-getsession.mdx+++ b/apps/reference/_supabase_js/generated/auth-getsession.mdx@@ -12,7 +12,7 @@ Returns the session data, refreshing it if necessary.If no session is detected, the session returned will be null.```js-const { data, error } = supabase.auth.getSession()+const { data, error } = await supabase.auth.getSession()```## Examples@@ -20,5 +20,5 @@ const { data, error } = supabase.auth.getSession()### Get the session data```js-const { data, error } = supabase.auth.getSession()+const { data, error } = await supabase.auth.getSession()```diff --git a/apps/reference/_supabase_js/generated/auth-getuser.mdx b/apps/reference/_supabase_js/generated/auth-getuser.mdxindex eecf7850f6f..cce9bb30d63 100644--- a/apps/reference/_supabase_js/generated/auth-getuser.mdx+++ b/apps/reference/_supabase_js/generated/auth-getuser.mdx@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'Gets the current user details if there is an existing session.```js-const user = supabase.auth.getUser()+const user = await supabase.auth.getUser()```## Parameters@@ -50,7 +50,7 @@ Takes in an optional access token jwt. If no jwt is provided, getUser() will att### Get the logged in user with the current existing session```js-const user = supabase.auth.getUser()+const user = await supabase.auth.getUser()```### Get the logged in user with a custom access token jwt.diff --git a/spec/supabase_js_v2_legacy.yml b/spec/supabase_js_v2_legacy.ymlindex db56e065b33..0d1a200d905 100644--- a/spec/supabase_js_v2_legacy.yml+++ b/spec/supabase_js_v2_legacy.yml@@ -47,8 +47,8 @@ pages:email: '[email protected]',password: 'example-password',options: {- data: {- first_name: 'John',+ data: {+ first_name: 'John',age: 27,}}@@ -94,9 +94,9 @@ pages:$ref: '@supabase/gotrue-js.GoTrueClient.signInWithOtp'notes: |- This method is used for passwordless sign-ins where an otp is sent to the user's email or phone number.- - Requires either an email or phone number.- - If you're using an email, you can configure whether you want the user to receive a magiclink or an otp.- - If you're using phone, you can configure whether you want the user to receive a magiclink or an otp.+ - Requires either an email or phone number.+ - If you're using an email, you can configure whether you want the user to receive a magiclink or an otp.+ - If you're using phone, you can configure whether you want the user to receive a magiclink or an otp.- The magic link's destination URL is determined by the SITE_URL config variable. To change this, you can go to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)examples:- name: Sign in with email.@@ -136,7 +136,7 @@ pages:isSpotlight: falsedescription: |The `redirectTo` param will only applied on the callback made from the third-party provider. It does not redirect the user immediately after invoking this method.- In order for the `redirectTo` param to be allowed, one needs to include it in an allowlist. Supabase supports this for+ In order for the `redirectTo` param to be allowed, one needs to include it in an allowlist. Supabase supports this forany URL path on your website (the URL must either be on the same domain as your Site URL [see Auth>Settings in dashboard], or must match one of the Additional Redirect URLs [also in Auth>Settings]).js: |```js@@ -196,7 +196,7 @@ pages:isSpotlight: truejs: |```js- const { data, error } = supabase.auth.getSession()+ const { data, error } = await supabase.auth.getSession()```auth.getUser():title: 'getUser()'@@ -209,7 +209,7 @@ pages:isSpotlight: truejs: |```js- const user = supabase.auth.getUser()+ const user = await supabase.auth.getUser()```- name: Get the logged in user with a custom access token jwt.isSpotlight: false