InvenTree
Configure Pocket ID with InvenTree
Requirements
- InvenTree.
- Pocket ID on https, reachable at
https://<pocketid-domain.tld> - InvenTree server on https, reachable at
https://<inventree-domain.tld>
Create OIDC Client in Pocket ID
- Create a new OIDC Client in Pocket ID (e.g.,
inventree). - Set the Callback URL to the value below, or leave blank to autofill on first login. Choose a name for
<provider-id>(e.g.,pocket-id) — you will use this same value asprovider_idin the configuration below. - Optional: Download a PNG or SVG logo from selfhst and upload.
- Client Launch URL:
- Enable PKCE.
- Copy the Client ID, Client Secret for configuring with InvenTree.
Configure InvenTree
The following is the minimal configuration needed to set up Pocket ID OIDC with InvenTree.
Option A: Configuration File (Recommended)
- Add the following to your
config.yaml, replacing values from Step 6:
Option B: Environment Variables
- Add the following lines to your InvenTree
.env, replacing the values from Step 7: - Save and restart the InvenTree docker-compose stack.
Enable SSO in InvenTree
Once InvenTree is restarted, enable SSO via the admin UI:
- Login as admin
- Navigate to System Settings → Authentication.
- Enable the following options:
- Enable SSO
- Enable SSO registration
- Auto-fill SSO users
Note: If Email Required is enabled but SMTP is not configured, SSO login may fail during user registration. Add the following to use the console email backend as a workaround: