Portainer
Sign in to the Portainer container management platform with Pocket ID.
Replace portainer.example.com with the URL of your Portainer instance and id.example.com with the URL of your Pocket ID instance.
Create the client in Pocket ID
Section titled “Create the client in Pocket ID”- In Pocket ID, open Administration → OIDC Clients and click Add OIDC Client.
- Enter a name such as
Portainerand add the callback URLhttps://portainer.example.com/. - Click Create and copy the Client ID and the Client secret. Under Show more details, also copy the Authorization URL, the Token URL, the Userinfo URL and the Logout URL. The client secret is only shown once.
- On the client’s Access tab, select the groups that may sign in under Allowed User Groups, or choose All Users.
Configure Portainer
Section titled “Configure Portainer”- While initially setting up OAuth in Portainer, it’s recommended to keep Hide internal authentication prompt set to
Offin case you need a fallback login. - This guide does not cover how to set up group claims in Portainer.
- Open the Portainer web interface and navigate to Settings → Authentication.
- Select Custom OAuth Provider.
- Paste the Client ID from Pocket ID into the Client ID field in Portainer.
- Paste the Client secret from Pocket ID into the Client Secret field in Portainer.
- Paste the Authorization URL from Pocket ID into the Authorization URL field in Portainer.
- Paste the Token URL from Pocket ID into the Access token URL field in Portainer.
- Paste the Userinfo URL from Pocket ID into the Resource URL field in Portainer.
- Set Redirect URL to
https://portainer.example.com/. - Paste the Logout URL from Pocket ID into the Logout URL field in Portainer.
- Set User identifier to
preferred_username. This uses the user’s username instead of the email. - Set Scopes to
email openid profile. - Set Auth Style to
Auto detect. - Save the settings and sign in with the OAuth button to test it.