Skip to content

Commit

Permalink
change option name from redirect_to to email_redirect_to
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks committed Jun 20, 2024
1 parent 4814aeb commit 019da4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion supabase_auth/_async/gotrue_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async def sign_up(
phone = credentials.get("phone")
password = credentials.get("password")
options = credentials.get("options", {})
redirect_to = options.get("redirect_to")
redirect_to = options.get("redirct_to") or options.get("email_redirect_to")
data = options.get("data") or {}
channel = options.get("channel", "sms")
captcha_token = options.get("captcha_token")
Expand Down
10 changes: 7 additions & 3 deletions supabase_auth/_sync/gotrue_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def sign_up(
phone = credentials.get("phone")
password = credentials.get("password")
options = credentials.get("options", {})
redirect_to = options.get("redirect_to")
redirect_to = options.get("redirct_to") or options.get("email_redirect_to")
data = options.get("data") or {}
channel = options.get("channel", "sms")
captcha_token = options.get("captcha_token")
Expand Down Expand Up @@ -588,7 +588,9 @@ def set_session(self, access_token: str, refresh_token: str) -> AuthResponse:
self._notify_all_subscribers("TOKEN_REFRESHED", session)
return AuthResponse(session=session, user=response.user)

def refresh_session(self, refresh_token: Union[str, None] = None) -> AuthResponse:
def refresh_session(
self, refresh_token: Union[str, None] = None
) -> AuthResponse:
"""
Returns a new session, regardless of expiry status.
Expand Down Expand Up @@ -979,7 +981,9 @@ def _get_url_for_provider(
if self._flow_type == "pkce":
code_verifier = generate_pkce_verifier()
code_challenge = generate_pkce_challenge(code_verifier)
self._storage.set_item(f"{self._storage_key}-code-verifier", code_verifier)
self._storage.set_item(
f"{self._storage_key}-code-verifier", code_verifier
)
code_challenge_method = (
"plain" if code_verifier == code_challenge else "s256"
)
Expand Down

0 comments on commit 019da4f

Please sign in to comment.