This app supports OAuth2/OIDC Authorization Code + PKCE. You can test against the included sample server in the Oauth2/ repo.
Steps (example):
- Start the auth server (in its repository):
export ENABLE_DEV_ENDPOINTS=true uv run server.py - In a browser, go to
http://127.0.0.1:8000/admin/uiand create/update a client namedopensentry-command:- Redirect URI:
http://localhost:5000/oauth2/callback(and/orhttp://127.0.0.1:5000/oauth2/callback) - Token auth:
none(public, PKCE) orclient_secret_post(confidential) - Allowed/default scopes:
openid profile email offline_access
- Redirect URI:
- Start OpenSentry Command:
uv run main.py
- Open the app and visit
/settings:- Auth mode:
oauth2 - Base URL:
http://127.0.0.1:8000(orhttp://host.docker.internal:8000when containerized) - Client ID:
opensentry-command - Client Secret: (only if confidential client)
- Scope:
openid profile email offline_access
- Auth mode:
- Click Save. Now log in.
If the provider is down, the app will offer a one-time local-login fallback.
- On the home page, run mDNS discovery (service
_opensentry._tcp.local.). - Provide a
Bearertoken if devices protect/status. - Click a device to view details; use the form to pin (persist) devices.
uv run discover.py --timeout 3.0 --status --token <TOKEN>