Skip to content

Commit 1bdc665

Browse files
committed
fix: [#474] return raw_user_info_from_provider in get_user_info in github
1 parent f1b9103 commit 1bdc665

File tree

1 file changed

+6
-3
lines changed
  • supertokens_python/recipe/thirdparty/providers

1 file changed

+6
-3
lines changed

supertokens_python/recipe/thirdparty/providers/github.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
from .custom import GenericProvider, NewProvider
2626
from ..provider import Provider, ProviderConfigForClient, ProviderInput
27+
from ..types import RawUserInfoFromProvider
2728

2829

2930
class GithubImpl(GenericProvider):
@@ -45,16 +46,18 @@ async def get_user_info(
4546
"Accept": "application/vnd.github.v3+json",
4647
}
4748

48-
raw_response = {}
49+
raw_user_info_from_provider = RawUserInfoFromProvider({}, {})
4950

5051
email_info: List[Any] = await do_get_request("https://api.github.com/user/emails", headers=headers) # type: ignore
5152
user_info = await do_get_request("https://api.github.com/user", headers=headers)
5253

53-
raw_response["emails"] = email_info
54-
raw_response["user"] = user_info
54+
user_info["emails"] = email_info
55+
raw_user_info_from_provider.from_user_info_api = user_info
5556

5657
result = UserInfo(
5758
third_party_user_id=str(user_info.get("id")),
59+
email=None,
60+
raw_user_info_from_provider=raw_user_info_from_provider,
5861
)
5962

6063
for info in email_info:

0 commit comments

Comments
 (0)