-
Notifications
You must be signed in to change notification settings - Fork 42
fix: [#474] return raw_user_info_from_provider in get_user_info in gi… #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
|
||
## [unreleased] | ||
|
||
- Return `raw_user_info_from_provider` in github provider [#474] | ||
|
||
## [0.27.0] - 2024-12-30 | ||
|
||
- Added OAuth2Provider recipe | ||
|
@@ -277,7 +279,7 @@ async def change_email(req: ChangeEmailBody, session: SessionContainer = Depends | |
# Update the email | ||
await update_email_or_password( | ||
session.get_recipe_user_id(), | ||
email, | ||
email, | ||
) | ||
|
||
# ... | ||
|
@@ -360,7 +362,7 @@ from supertokens_python.types import RecipeUserId | |
|
||
def functions_override(original_implementation: RecipeInterface): | ||
o_create_new_session = original_implementation.create_new_session | ||
|
||
async def n_create_new_session( | ||
user_id: str, | ||
recipe_user_id: RecipeUserId, | ||
|
@@ -377,7 +379,7 @@ def functions_override(original_implementation: RecipeInterface): | |
return await o_create_new_session(user_id, recipe_user_id, access_token_payload, session_data_in_database, disable_anti_csrf, tenant_id, user_context) | ||
|
||
original_implementation.create_new_session = n_create_new_session | ||
|
||
return original_implementation | ||
|
||
session.init(override=session.InputOverrideConfig(functions=functions_override)) | ||
|
@@ -395,7 +397,7 @@ from supertokens_python.types import RecipeUserId | |
|
||
def functions_override(original_implementation: RecipeInterface): | ||
o_create_new_session = original_implementation.create_new_session | ||
|
||
async def n_create_new_session( | ||
user_id: str, | ||
recipe_user_id: RecipeUserId, | ||
|
@@ -412,7 +414,7 @@ def functions_override(original_implementation: RecipeInterface): | |
return await o_create_new_session(user_id, recipe_user_id, access_token_payload, session_data_in_database, disable_anti_csrf, tenant_id, user_context) | ||
|
||
original_implementation.create_new_session = n_create_new_session | ||
|
||
return original_implementation | ||
|
||
session.init(override=session.InputOverrideConfig(functions=functions_override)) | ||
|
@@ -632,7 +634,7 @@ thirdparty.init( | |
third_party_id="google", | ||
# rest of the config | ||
), | ||
|
||
# Add the following line to make this provider available in non-public tenants by default | ||
include_in_non_public_tenants_by_default=True | ||
), | ||
|
@@ -641,7 +643,7 @@ thirdparty.init( | |
third_party_id="github", | ||
# rest of the config | ||
), | ||
|
||
# Add the following line to make this provider available in non-public tenants by default | ||
include_in_non_public_tenants_by_default=True | ||
), | ||
|
@@ -733,7 +735,7 @@ for tenant in tenants_res.tenants: | |
|
||
- The way to get user information has changed: | ||
- If you are using `get_users_by_email` from `thirdpartyemailpassword` recipe: | ||
|
||
Before: | ||
```python | ||
from supertokens_python.recipe.thirdpartyemailpassword.syncio import get_users_by_email | ||
|
@@ -745,20 +747,20 @@ for tenant in tenants_res.tenants: | |
```python | ||
from supertokens_python.recipe.thirdparty.syncio import get_users_by_email as get_users_by_email_third_party | ||
from supertokens_python.recipe.emailpassword.syncio import get_user_by_email as get_user_by_email_emailpassword | ||
|
||
third_party_user_info = get_users_by_email_third_party("public", "[email protected]") | ||
|
||
email_password_user_info = get_user_by_email_emailpassword("public", "[email protected]") | ||
|
||
if email_password_user_info is not None: | ||
print(email_password_user_info) | ||
|
||
if len(third_party_user_info) > 0: | ||
print(third_party_user_info) | ||
``` | ||
|
||
- If you are using `get_user_id` from `thirdpartyemailpassword` recipe: | ||
|
||
Before: | ||
```python | ||
from supertokens_python.recipe.thirdpartyemailpassword.syncio import get_user_by_id | ||
|
@@ -783,9 +785,9 @@ for tenant in tenants_res.tenants: | |
else: | ||
print(thirdparty_user) | ||
``` | ||
|
||
- If you are using `get_users_by_email` from `thirdpartypasswordless` recipe: | ||
|
||
Before: | ||
```python | ||
from supertokens_python.recipe.thirdpartypasswordless.syncio import get_users_by_email | ||
|
@@ -797,20 +799,20 @@ for tenant in tenants_res.tenants: | |
```python | ||
from supertokens_python.recipe.thirdparty.syncio import get_users_by_email as get_users_by_email_third_party | ||
from supertokens_python.recipe.passwordless.syncio import get_user_by_email as get_user_by_email_passwordless | ||
|
||
third_party_user_info = get_users_by_email_third_party("public", "[email protected]") | ||
|
||
passwordless_user_info = get_user_by_email_passwordless("public", "[email protected]") | ||
|
||
if passwordless_user_info is not None: | ||
print(passwordless_user_info) | ||
|
||
if len(third_party_user_info) > 0: | ||
print(third_party_user_info) | ||
``` | ||
|
||
- If you are using `get_user_id` from `thirdpartypasswordless` recipe: | ||
|
||
Before: | ||
```python | ||
from supertokens_python.recipe.thirdpartypasswordless.syncio import get_user_by_id | ||
|
@@ -1022,7 +1024,7 @@ With this update, verify_session will return a 401 error if it detects multiple | |
) | ||
``` | ||
|
||
- In the session recipe, if there is an `UNAUTHORISED` or `TOKEN_THEFT_DETECTED` error, the session tokens are cleared in the response regardless of if you have provided your own `error_handlers` in `session.init` | ||
- In the session recipe, if there is an `UNAUTHORISED` or `TOKEN_THEFT_DETECTED` error, the session tokens are cleared in the response regardless of if you have provided your own `error_handlers` in `session.init` | ||
|
||
## [0.17.0] - 2023-11-14 | ||
- Fixes `create_reset_password_link` in the emailpassword recipe wherein we passed the `rid` instead of the token in the link | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look fine to me. please update changelog and version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changelog updated