Skip to content

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

Update docs for auth.getUser() to add reference to auth.getSession() as a faster alternative

Lucas Smith45f2b474eaf4
diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.yml
index b4d3080a4e4..f06ca19edc5 100644
--- a/spec/supabase_js_v2.yml
+++ b/spec/supabase_js_v2.yml
@@ -356,6 +356,7 @@ functions:
notes: |
- This method gets the user object from the current session.
- Fetches the user object from the database instead of local session.
+ - Should be used only when you require the most current user data. For faster results, `getSession().session.user` is recommended.
examples:
- id: get-the-logged-in-user-with-the-current-existing-session
name: Get the logged in user with the current existing session