Python: Retrieve a user | Supabase Docs (original) (raw)
This method fetches the user object from the database instead of local session.
This method is useful for checking if the user is authorized because it validates the user's access token JWT on the server.
Parameters
jwt
(Optional)
Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
Examples
Get the logged in user with the current existing session
response = supabase.auth.get_user()
Get the logged in user with a custom access token jwt
response = supabase.auth.get_user(jwt)