pgAdmin
Sign in to the pgAdmin PostgreSQL management tool with Pocket ID.
Replace pgadmin.example.com with the URL of your pgAdmin 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
pgAdminand add the callback URLhttps://pgadmin.example.com/oauth2/authorize. - Click Create and copy the Client ID and the Client secret. 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 pgAdmin
Section titled “Configure pgAdmin”-
Add the following to the
config_local.pyfile for pgAdmin:AUTHENTICATION_SOURCES = ['oauth2', 'internal'] # This keeps internal authentication enabled as well as oauth2OAUTH2_AUTO_CREATE_USER = TrueOAUTH2_CONFIG = [{'OAUTH2_NAME' : 'pocketid','OAUTH2_DISPLAY_NAME' : 'Pocket ID','OAUTH2_CLIENT_ID' : '<client-id>','OAUTH2_CLIENT_SECRET' : '<client-secret>','OAUTH2_TOKEN_URL' : 'https://id.example.com/api/oidc/token','OAUTH2_AUTHORIZATION_URL' : 'https://id.example.com/authorize','OAUTH2_API_BASE_URL' : 'https://id.example.com','OAUTH2_USERINFO_ENDPOINT' : 'https://id.example.com/api/oidc/userinfo','OAUTH2_SERVER_METADATA_URL' : 'https://id.example.com/.well-known/openid-configuration','OAUTH2_SCOPE' : 'openid email profile','OAUTH2_ICON' : 'fa-openid','OAUTH2_BUTTON_COLOR' : '#fd4b2d' # Can select any color you would like here.}]Make sure to replace
https://id.example.comwith your actual Pocket ID URL.