C#: Update a user

Updates user data, if there is a logged in user.

Examples

Update the email for an authenticated user

var attrs = new UserAttributes { Email = "new-email@example.com" };
var response = await supabase.Auth.Update(attrs);

Update the password for an authenticated user

var attrs = new UserAttributes { Password = "***********" };
var response = await supabase.Auth.Update(attrs);

Update the user's metadata

var attrs = new UserAttributes
{
  Data = new Dictionary<string, string> { {"example", "data" } }
};
var response = await supabase.Auth.Update(attrs);