Skip to main content

django-social-oauth-token

ci status pypi link codecov
supported python versions supported django versions

Installation • Contributing • How To Use • License

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

Metadata

Release files for django-social-oauth-token 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-social-oauth-token 2.2.0
File Size Uploaded
django_social_oauth_token-2.2.0.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-social-oauth-token 2.2.0
File Interpreter ABI Platform
django_social_oauth_token-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / django_social_oauth_token-2.2.0.tar.gz

Download URL django_social_oauth_token-2.2.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9a5a44a938df4130cc4ebf86694bf627aceaf9de5a0d78278d1b15083d42d606
BLAKE2b-256 checksum
How to use checksums
dfa59c17995d5d74b97c26a7b35cf88227af0efdd0ba59cfc4c772255d2b069a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.8 Linux/5.15.0-1022-azure

Release files / django_social_oauth_token-2.2.0-py3-none-any.whl

Download URL django_social_oauth_token-2.2.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85b4b871358dc0fc0a8ca6bb7691bd367878f3e442d326945f77f932dc1e1a59
BLAKE2b-256 checksum
How to use checksums
8a7e30c2f99e83ca5b2c67c37715955b9d64831d7dde44f82207f34f2dff3126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.8 Linux/5.15.0-1022-azure

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page