Skip to content
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

Add User's Info to Conver-Token response #238

Merged
merged 4 commits into from
Jul 19, 2024
Merged

Conversation

wagnerdelima
Copy link
Owner

@wagnerdelima wagnerdelima commented Jul 19, 2024

Description

User's name, last name and email have been added to the convert-token's response.

Fixes # (issue)

Checklist

  • Do unit tests run with no errors?
  • Has coverage not decreased?
  • Is your code concise and clean?
  • Are the conf.py and installation sphinx updated with the new version?
  • Is the init.py version variable updated?

A new class, LinkedInOpenIDUserInfo, has been added to the backends file. This class queries LinkedIn's userinfo API, processes the response for errors, and maps response fields to user details. The new functionality extends the social authentication support to include LinkedIn's OpenID Connect service.
The version number of the package drf-social-oauth2 has been incremented to '3.1.0' from '3.0.1'. Also, the documentation and installation instructions have been updated to reflect this new version.
 Removed unnecessary config fields since LinkedIn deprecated them since Aug, 2024.
Two new methods have been introduced in the views.py file of the drf-social-oauth2 module. The 'get_user' method retrieves the user associated with an access token. The 'prepare_response' method, on the other hand, adds user detailed info such as email, first name, and last name into the response data. The returned response from the 'post' method has been updated to utilize these changes.
@wagnerdelima wagnerdelima changed the title Downloads badge Add User's Info to Conver-Token response Jul 19, 2024
@wagnerdelima wagnerdelima merged commit b2a33a9 into master Jul 19, 2024
20 checks passed
@wagnerdelima wagnerdelima deleted the downloads-badge branch July 19, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant