Go to file
2024-06-20 09:44:12 +02:00
blender_id_oauth_client Prepare for Django 4 2024-06-20 09:44:12 +02:00
docs Fix #1: Moved from Pipenv to Poetry for dependency management 2019-06-05 12:15:47 +02:00
tests Tests: don't fail on successful mypy run 2023-12-12 16:29:01 +01:00
.gitignore Fix #1: Moved from Pipenv to Poetry for dependency management 2019-06-05 12:15:47 +02:00
LICENSE Initial checkin 2018-09-07 10:11:41 +02:00
manage.py Initial checkin 2018-09-07 10:11:41 +02:00
MANIFEST.in README.md → .rst 2018-09-07 10:56:41 +02:00
pyproject.toml Prepare for Django 4 2024-06-20 09:44:12 +02:00
README.md Converted README.rst to README.md 2019-06-05 12:22:43 +02:00
setup.cfg Initial checkin 2018-09-07 10:11:41 +02:00
update_version.sh update_version.sh now suggests to commit the correct file 2019-06-05 12:22:25 +02:00

Blender ID OAuth Client

This OAuth Client allows your Django application to authenticate against Blender ID, the authentication service of Blender Foundation.

Quick start

  • Add blender_id_oauth_client to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'blender_id_oauth_client',
    ]
    
  • Add BLENDER_ID configuration:

    BLENDER_ID = {
        # MUST end in a slash:
        'BASE_URL': 'http://id.local:8000/',
        'OAUTH_CLIENT': 'TEST-CLIENT-ID',
        'OAUTH_SECRET': 'TEST-SECRET'
    }
    
  • Configure the correct URLs for logging in and out:

    LOGIN_URL = '/oauth/login'
    LOGOUT_URL = '/oauth/logout'
    LOGIN_REDIRECT_URL = '/redir-target-after-login'
    
    # Set to empty string to remain on Blender ID after logging   out:
    LOGOUT_REDIRECT_URL = '/redir-target-after-logout'
    
  • Include the URLconf in your project urls.py like this:

    path('oauth/', include('blender_id_oauth_client.urls')),
    
  • Run python manage.py migrate to create the polls models.

  • Start the development server and visit http://127.0.0.1:8000/oauth/login to create a local user by authenticating against Blender ID.

  • Run python manage.py makesuperuser your@email to make yourself a superuser.