2023-10-22 19:40:45 +02:00
|
|
|
# Wikimedia OAuth2 Django Demo
|
|
|
|
A minimal prototype showing how to authenticate wikimedia
|
|
|
|
users with OAuth2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Quick Start
|
|
|
|
1. Create virtual environment
|
|
|
|
```bash
|
|
|
|
virtualenv --python=python3.9 venv
|
|
|
|
```
|
2023-10-22 19:43:19 +02:00
|
|
|
2. Install requirements
|
2023-10-22 19:40:45 +02:00
|
|
|
```bash
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
2023-10-22 19:43:19 +02:00
|
|
|
3. Run the server
|
2023-10-22 19:40:45 +02:00
|
|
|
```bash
|
|
|
|
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.
|
|
|
|
|
2023-10-22 19:46:10 +02:00
|
|
|
## Credits to songrgg
|
2023-10-22 19:40:45 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|