drf-social-oauth2 | oauth2 makes it easy to integrate Django | Authentication library
kandi X-RAY | drf-social-oauth2 Summary
kandi X-RAY | drf-social-oauth2 Summary
drf-social-oauth2 makes it easy to integrate Django social authentication with major OAuth2 providers, i.e., Facebook, Twitter, Google, etc.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Handle POST requests
- Returns the user object
- Creates a token response
- Set http request object
- Handles password creation
drf-social-oauth2 Key Features
drf-social-oauth2 Examples and Code Snippets
Community Discussions
Trending Discussions on drf-social-oauth2
QUESTION
I want to add data (such as the token expiration date or user info) to the payload of the JWT generated by this library.
The current decoded payload of a JWT generated by this library is the following:
...ANSWER
Answered 2021-Apr-14 at 23:02drf-social-oauth2
doesn't provide a mechanism to easily override this setting, it overrides oauth2_provider.settings.ACCESS_TOKEN_GENERATOR
with their generate_token
method (https://github.com/wagnerdelima/drf-social-oauth2/blob/master/drf_social_oauth2/settings.py#L11-L14), this method doesn't include extra values, only the token.
You can do the same on your side overriding the value with a custom method that adds the needed keys.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install drf-social-oauth2
You can use drf-social-oauth2 like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page