Skip to main content

django-discord-oauth2

Installation

pip install django-discord-oauth2

Usage

  1. Add django_discord_oauth2 to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        'django_discord_oauth2',
    ]
    
  2. Include the django_discord_oauth2 URLconf in your project urls.py like this:

    from django.urls import include, path
    
    urlpatterns = [
        path('oauth2/', include('django_discord_oauth2.urls')),
    ]
    
  3. Run python manage.py migrate to create the necessary models.

  4. Add your Discord application credentials to your settings:

    DISCORD_CLIENT_ID = 'your_client_id'
    DISCORD_CLIENT_SECRET = 'your_client_secret'
    DISCORD_REDIRECT_URI = 'your_redirect_uri'
    
How to get these variables?
  1. Visit Discord Developer Portal.
  2. Create a new application or use an existing one.
  3. Open the OAuth2 section in the left panel:

image

  1. Copy the CLIENT ID:

image

  1. This is your DISCORD_CLIENT_ID.
  2. Press the "Reset Secret" button and copy the token:

image

  1. This is your DISCORD_CLIENT_SECRET.
  2. Add a redirect URL, for example:

image

  1. Start the development server and visit http://127.0.0.1:8000/oauth2/login/ to initiate the login process.

Metadata

Release files for django-discord-oauth2 0.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-discord-oauth2 0.2.0
File Size Uploaded Provenance Actions
django_discord_oauth2-0.2.0.tar.gz 8.6 kB Without provenance Details for django_discord_oauth2-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-discord-oauth2 0.2.0
File Interpreter ABI Platform Actions
django_discord_oauth2-0.2.0-py3-none-any.whl Python 3 none any Details for django_discord_oauth2-0.2.0-py3-none-any.whl

Total release size: 19.5 kB

Release files / django_discord_oauth2-0.2.0.tar.gz

Download URL django_discord_oauth2-0.2.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ddd073c0460c98a1e736e95d6d9b75a51af5f79833603a5af4f30e3081f08ed6
BLAKE2b-256 checksum
How to use checksums
8c9c6f52037b1b7898ad5e68501e23276650429c6c2c44a9f76a8207b0e16b9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.7

Release files / django_discord_oauth2-0.2.0-py3-none-any.whl

Download URL django_discord_oauth2-0.2.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33345b3039b52bedcef97378d77751168888fcc141334382782e7e698139eccb
BLAKE2b-256 checksum
How to use checksums
176824e1dd1fcdf433b6e5686ccade36da23aebecd2a4712579984afe4dda730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.7

Security for django-discord-oauth2 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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