From 45f2b474eaf47e27dbb2963d68bd3325fb89aff7 Mon Sep 17 00:00:00 2001 From: Lucas Smith Date: Mon, 13 Feb 2023 09:12:26 +1100 Subject: [PATCH] Update docs for auth.getUser() to add reference to auth.getSession() as a faster alternative --- spec/supabase_js_v2.yml | 1 + 1 file changed, 1 insertion(+) 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