A simple Django project with openid working with dotnetaccess
cp back/.env.sample back/.env Add your secrets to your env then
docker compose up -dThen go to https://localhost
- openssl in order to generate certificates. Easier to use WSL if you're on Windows.
cp .env.sample .envThen adapt the .env file
python -m venv venv
./venv/Scripts/activate
pip install -r requirements.txt
cd back
python manage.py migrate
python manage.py runserverGo to http://127.0.0.1:8000
Backend should work. Authentication on backend should also work.
⚠ Do not change docker port on local, the only allowed host registered on OpenID is http://127.0.0.1:8000
We want a frontend to access secured backend endpoints. On a separate terminal, run the frontend
cd front
npm run startNow, we need a proxy for two reasons:
- Avoid cross domain cookies (possible but needs extra config)
- HTTPS endpoints
In a new terminal (a wsl one if you're on windows), generate the certificates:
openssl req -x509 -nodes -days 365 \
-newkey rsa:2048 \
-keyout apache/certs/server.key \
-out apache/certs/server.crt \
-subj "/CN=localhost"Two files should appear in apache/certs folder.
Now you can run apache in a Docker container or copy your certification to your installation.
Go to https://localhost
Login should work.