Skip to content

Latest commit

 

History

History

auth_samples_python

Folders and files

README.md

Tuurio Auth Python Demo

A server-rendered Flask demo that signs in with OAuth 2.0 / OpenID Connect, keeps tokens in a server-side session, and supports logout. The local starter uses a filesystem-backed CacheLib session store; use Redis or another shared Flask-Session backend for a multi-instance production deployment.

Integration guide

Setup

cd auth_samples_python
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# edit .env with your tenant/client values
python app.py

Open http://localhost:8083.

Required client URLs

Configure your Tuurio client with these redirect URLs (matching your .env values):

Redirect URI: http://localhost:8083/auth/callback
Post-logout Redirect URI: http://localhost:8083/logout/callback

.env keys

TUURIO_ISSUER=https://YOUR_TENANT.id.tuurio.com
TUURIO_CLIENT_ID=YOUR_CLIENT_ID
TUURIO_CLIENT_SECRET=YOUR_CLIENT_SECRET
TUURIO_REDIRECT_URI=http://localhost:8083/auth/callback
TUURIO_POST_LOGOUT_REDIRECT_URI=http://localhost:8083/logout/callback
TUURIO_SCOPE=openid profile email
TUURIO_SESSION_SECRET=tuurio-auth-sample

Values come from your Tuurio Connect page:

https://<tenantId>.id.tuurio.com/admin/clients