From e22550464d209e817118259caa06a06e3c494a42 Mon Sep 17 00:00:00 2001 From: joel Date: Sun, 28 Jan 2024 23:22:06 +0800 Subject: [PATCH] fix: apply sourcery suggestions --- gotrue/_async/gotrue_client.py | 6 ++++++ gotrue/_sync/gotrue_client.py | 6 ++++++ gotrue/types.py | 3 +-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gotrue/_async/gotrue_client.py b/gotrue/_async/gotrue_client.py index 2335e509..2b5f251f 100644 --- a/gotrue/_async/gotrue_client.py +++ b/gotrue/_async/gotrue_client.py @@ -286,6 +286,9 @@ async def sign_in_with_sso(self, credentials: SignInWithSSOCredentials): body={ "domain": domain, "skip_http_redirect": skip_http_redirect, + "gotrue_meta_security": { + "captcha_token": captcha_token, + }, }, redirect_to=redirect_to, xform=parse_sso_response, @@ -297,6 +300,9 @@ async def sign_in_with_sso(self, credentials: SignInWithSSOCredentials): body={ "provider_id": provider_id, "skip_http_redirect": skip_http_redirect, + "gotrue_meta_security": { + "captcha_token": captcha_token, + }, }, redirect_to=redirect_to, xform=parse_sso_response, diff --git a/gotrue/_sync/gotrue_client.py b/gotrue/_sync/gotrue_client.py index 4ac013e3..8e695010 100644 --- a/gotrue/_sync/gotrue_client.py +++ b/gotrue/_sync/gotrue_client.py @@ -286,6 +286,9 @@ def sign_in_with_sso(self, credentials: SignInWithSSOCredentials): body={ "domain": domain, "skip_http_redirect": skip_http_redirect, + "gotrue_meta_security": { + "captcha_token": captcha_token, + }, }, redirect_to=redirect_to, xform=parse_sso_response, @@ -297,6 +300,9 @@ def sign_in_with_sso(self, credentials: SignInWithSSOCredentials): body={ "provider_id": provider_id, "skip_http_redirect": skip_http_redirect, + "gotrue_meta_security": { + "captcha_token": captcha_token, + }, }, redirect_to=redirect_to, xform=parse_sso_response, diff --git a/gotrue/types.py b/gotrue/types.py index 5d0dd2be..04e804d1 100644 --- a/gotrue/types.py +++ b/gotrue/types.py @@ -335,8 +335,7 @@ class SignInWithSSOCredentials(TypedDict): class SignInWithSSOOptions(TypedDict): redirect_to: NotRequired[str] - captcha_token: NotRequired[str] - skip_http_redirect: NotRequired[str] + skip_http_redirect: NotRequired[bool] class VerifyOtpParamsOptions(TypedDict):