Swift: Update a user

Examples

Update the email for an authenticated user

try await supabase.auth.update(user: UserAttributes(email: "[email protected]"))

Update the phone number for an authenticated user

try await supabase.auth.update(
  user: UserAttributes(
    phone: "123456789"
  )
)

Update the password for an authenticated user

try await supabase.auth.update(user: UserAttributes(password: "newPassw0rd?"))

Update the user's metadata

try await supabase.auth.update(
  user: UserAttributes(
    data: [
      "hello": .string("world")
    ]
  )
)

Update the user's password with a nonce

try await supabase.auth.update(
  user: UserAttributes(
    password: "new password",
    nonce: "123456"
  )
)