This is an example, how to implement standard basic oauth. With out any added complexity through the specific app it gets build into.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
alpcentaur 39008d4de7 updated numbering in README.md 1 year ago
oauth_demo full example with one little change in code to make it work, some changes in the settings file 1 year ago
.gitignore full example with one little change in code to make it work, some changes in the settings file 1 year ago
LICENSE full example with one little change in code to make it work, some changes in the settings file 1 year ago
README.md updated numbering in README.md 1 year ago
manage.py full example with one little change in code to make it work, some changes in the settings file 1 year ago
requirements.txt full example with one little change in code to make it work, some changes in the settings file 1 year ago

README.md

Wikimedia OAuth2 Django Demo

A minimal prototype showing how to authenticate wikimedia users with OAuth2

Quick Start

  1. Create virtual environment
virtualenv --python=python3.9 venv
  1. Install requirements
pip install -r requirements.txt
  1. Run the server
python manage.py migrate
python manage.py runserver

Behind the scene

The OAuth2 configuration is located at settings.py

The default session backend is sqlite3.

The base for this prototype was done by songrgg, who published his code on Microsoft's Github. His Blog Post you can find here: https://songrgg.github.io/programming/django-oauth-client-setup