Skip to main content

user()

Inside a browser context, user() will return the user data, if there is a logged in user.

For server-side management, you can get a user through auth.api.getUserByCookie()

const user = supabase.auth.user()

Notes#

This method gets the user object from memory.

Examples#

Get the logged in user#

const user = supabase.auth.user()