Dart Reference v2.0

Retrieve a user

Get user by id.

  • Fetches the user object from the database based on the user's id.
  • The getUserById() method requires the user's id which maps to the auth.users.id column.
Parameters
    uid
    REQUIRED
    String

    User ID of the user to fetch.


final res = await supabase.auth.admin.getUserById(userId);
final user = res.user;