Grafana
Below URLs are used as placeholders for the Grafana and Pocket ID instances. Replace them with the actual URLs.
- grafana.example.com (The url of your Grafana instance.)
- pocketid.example.com (The url of your Pocket ID instance.)
Pocket ID Setup
- In Pocket ID, create a new OIDC client named
grafana
(or any name you prefer). - (Optional) Set a logo for the OIDC client.
- Set the callback URL to:
https://grafana.example.com/login/generic_oauth
- Copy the
Client ID
,Client Secret
,Authorization URL
andToken URL
for the next steps.
Grafana App Setup
- Login to Grafana as the admin user.
- Go to Administration -> Authentication and select Generic OAuth.
- Enter the values for the fields as given below in the General Settings:
Display Name
as 'Pocket ID' or something similar.Client Id
as theClient ID
from above.Client secret
as theClient Secret
from above.Auth style
as 'Auto Detect'.Scopes
as 'openid', 'email' and 'profile'.Auth URL
asAuthorization URL
from above.Token URL
asToken URL
from above.- Leave
API URL
andSign out redirect URL
as empty. - Leave
Allow sign up
andAuto login
as disabled.
- Under User mapping:
- Only set
Email attribute name
as 'email:primary' and leave all other fields as empty. - Only enable
Skip organization role sync
and other toggles as disabled.
- Only set
- Nothing to be done under Extra security measures.
- Save the settings.
- Next create a new admin user or update the existing admin user under the Users settings to have the same email address as your user in Pocket-ID. Also set the username to the same email id.
- Logout and test the OAuth based login.
note
In case you get locked out of your account before the OAuth setup is completed successfully and need to reset the password refer this link.