diff --git a/gotrue/_async/gotrue_client.py b/gotrue/_async/gotrue_client.py index 7bc93f84..07ec7288 100644 --- a/gotrue/_async/gotrue_client.py +++ b/gotrue/_async/gotrue_client.py @@ -875,7 +875,7 @@ def exchange_code_for_session(auth_code: str): "POST", "token?grant_type=pkce", body={ - "auth_code": email, + "auth_code": auth_code, "code_verifier": code_verifier, }, redirect_to=redirect_to, diff --git a/gotrue/_sync/gotrue_client.py b/gotrue/_sync/gotrue_client.py index 127f448e..0d2107d2 100644 --- a/gotrue/_sync/gotrue_client.py +++ b/gotrue/_sync/gotrue_client.py @@ -873,7 +873,7 @@ def exchange_code_for_session(auth_code: str): "POST", "token?grant_type=pkce", body={ - "auth_code": email, + "auth_code": auth_code, "code_verifier": code_verifier, }, redirect_to=redirect_to,