Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-social-oauth-token

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-social-oauth-token

OAuth Token generation API for handling OAuth 2.0 Authentication Code Flow based on social-auth

  • 2.2.0
  • PyPI
  • Socket score

Maintainers
1

django-social-oauth-token

ci status pypi link codecov
supported python versions supported django versions

InstallationContributingHow To UseLicense

OAuthToken generation API for handling OAuth 2.0 Authentication Code Flow based on social-auth

Installation

  1. Use your preferred package manager (pip, poetry, pipenv) to install the package. For example:
$ poetry add django-social-oauth-token
  1. Then register 'social_oauth_token', in the 'INSTALLED_APPS' section of your project's settings.
# settings.py
...

INSTALLED_APPS = (
    ...
    'social_oauth_token',
)

...
  1. Include the urlpatterns in your main urls file.
# urls.py

urlpatterns = [
  ...
  path("social_oauth_token/", include("social_oauth_token.urls", namespace="social_oauth_token")),
  ...
]

How To Use

In order to verify the Authorization Code sent by the user and replace it with your own OAuth Access Token, send a POST request to the token/<backend>/ endpoint with client_id and code to receive the token.

The POST request parameters:

client_id # OAuth Client ID
code # Authorization Code

The JSON response:

{
  "access_token": <access_token>,
  "expires_in": <expires_in>,
  "token_type": <token_type>,
  "refresh_token": <refresh_token>,
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT License

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc