From c13e2c78522dc77f0e3591cff2c71f9b793526a1 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Fri, 2 Aug 2024 14:13:32 +0000 Subject: [PATCH 1/3] fix: add fly, linkedin_oidc and slack_oidc provider type --- supabase_auth/types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/supabase_auth/types.py b/supabase_auth/types.py index c5a09468..56ae9ae3 100644 --- a/supabase_auth/types.py +++ b/supabase_auth/types.py @@ -26,14 +26,17 @@ "discord", "facebook", "figma", + "fly", "github", "gitlab", "google", "kakao", "keycloak", "linkedin", + "linkedin_oidc", "notion", "slack", + "slack_oidc", "spotify", "twitch", "twitter", From 2adcd7f349a86e4af55961ff48e374e7c8221148 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Fri, 2 Aug 2024 14:16:00 +0000 Subject: [PATCH 2/3] fix: add role, password_hash & id types to admin user attributes --- supabase_auth/types.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/supabase_auth/types.py b/supabase_auth/types.py index 56ae9ae3..d542c955 100644 --- a/supabase_auth/types.py +++ b/supabase_auth/types.py @@ -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): From 41cefcf441dedd78d5e0531160588705b8da560b Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Fri, 2 Aug 2024 17:06:02 +0000 Subject: [PATCH 3/3] update docker compose command call --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a95855b2..c2307ba7 100644 --- a/Makefile +++ b/Makefile @@ -14,12 +14,12 @@ tests_only: run_infra: cd infra &&\ - docker-compose down &&\ - docker-compose up -d + docker compose down &&\ + docker compose up -d clean_infra: cd infra &&\ - docker-compose down --remove-orphans &&\ + docker compose down --remove-orphans &&\ docker system prune -a --volumes -f sync_infra: