Skip to content

Feature: Support for user metadata #17

@lexum0

Description

@lexum0

The user metadata is used to store user information or sign in information (to hold information like name and last name before the user confirms their email and a profile is created)

To save the user info at sign up:

try await supabase.auth.signUp(
  email: "example@email.com",
  password: "example-password",
  data: [
    "first_name": .string("John"),
    "age": .number(24)
  ]
)

You need to click Sign up with additional user metadata in the docs to show the function
https://supabase.com/docs/reference/swift/auth-signup

To read get the current data: supabase.auth.session.user.userMetadata

To update or remove the metadata:

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

https://supabase.com/docs/reference/swift/auth-updateuser

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions