Skip to content

Commit

Permalink
fix: add role, password_hash & id types to admin user attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks committed Aug 2, 2024
1 parent c13e2c7 commit 2adcd7f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions supabase_auth/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,28 @@ class AdminUserAttributes(UserAttributes, TypedDict):
email_confirm: NotRequired[bool]
phone_confirm: NotRequired[bool]
ban_duration: NotRequired[Union[str, Literal["none"]]]
role: NotRequired[str]
"""
The `role` claim set in the user's access token JWT.
When a user signs up, this role is set to `authenticated` by default. You should only modify the `role` if you need to provision several levels of admin access that have different permissions on individual columns in your database.
Setting this role to `service_role` is not recommended as it grants the user admin privileges.
"""
password_hash: NotRequired[str]
"""
The `password_hash` for the user's password.
Allows you to specify a password hash for the user. This is useful for migrating a user's password hash from another service.
Supports bcrypt and argon2 password hashes.
"""
id: NotRequired[str]
"""
The `id` for the user.
Allows you to overwrite the default `id` set for the user.
"""


class Subscription(BaseModel):
Expand Down

0 comments on commit 2adcd7f

Please sign in to comment.