BookStack SSO with Authentik (OIDC)
Use authentik discovery with BookStack, and prebind existing BookStack profiles to their external identifiers before changing authentication mode.
Last updated
On this page (5)
BookStack · Authentik · OIDC
Before you start
- BookStack release with OIDC support and access to its .env.
- authentik OAuth2/OpenID Provider and Application.
- Backup and configuration rollback.
Configure sign-in
- Create the authentik application/provider with a confidential client and the exact BookStack /oidc/callback HTTPS URI; restrict it with application policy.
- Set AUTH_METHOD=oidc, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, OIDC_ISSUER to the application’s issuer URL and OIDC_ISSUER_DISCOVER=true; restart as required.
- Set each migrating user’s External Authentication ID to the identifier actually emitted by authentik (normally sub). For role sync, emit groups, configure OIDC_USER_TO_GROUPS and match the claim values to BookStack role external IDs.
Verify the result
- Verify the existing admin and an author retain the same user IDs, ownership and intended roles. Test role removal on login including the effect of OIDC_REMOVE_FROM_GROUPS on manually assigned roles.
- If enabling OIDC_END_SESSION_ENDPOINT, verify logout at both ends; access-policy removal does not itself demonstrate that prior BookStack credentials or sessions ended.
