Skip to content

Commit

Permalink
feat: add sync methods
Browse files Browse the repository at this point in the history
  • Loading branch information
joel@joellee.org committed Jan 12, 2024
1 parent a29083a commit 280dc40
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions gotrue/_sync/gotrue_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,25 @@ def sign_in_with_oauth(
url = self._get_url_for_provider(provider, params)
return OAuthResponse(provider=provider, url=url)

def link_identity(credentials):
redirect_to = options.get("redirect_to")
scopes = options.get("scopes")
params = options.get("query_params", {})
if redirect_to:
params["redirect_to"] = redirect_to
if scopes:
params["scopes"] = scopes
params["skip_browser_redirect"] = True

url = self._get_url_for_provider(provider, params)
return OAuthResponse(provider=provider, url=url)

def unlink_identity(identity):
return self._request(
"POST",
f"/user/identities/{identity.identity_id}",
)

def sign_in_with_otp(
self,
credentials: SignInWithPasswordlessCredentials,
Expand Down

0 comments on commit 280dc40

Please sign in to comment.