🐛 Bug Report: OIDC with pgadmin not working #501

Closed
opened 2025-10-08 00:11:28 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @dhop90 on GitHub.

Reproduction steps

I have been able to setup the pocketid app and configure users and add passkeys as well as log in. I'm have an issue setting up an initial client and looking for more configuration help and examples. I'm using pgadmin as my first configuration client. One reason is that it allows for configuring multiple OIDC providers. I currently have pgamdin successfully configured for Authentik.

Expected behavior

I'm able to configure pgadmin and other clients to use pocketid

Actual Behavior

I'm not able to configure pgadmin as a client.

Current pocketid configuration for pgadmin client:
callback URL : https://pgadmin.domain.org/oauth2/authorize

pgadmin config:
'OAUTH2_NAME': 'PocketID',
'OAUTH2_DISPLAY_NAME': 'PocketID',
'OAUTH2_CLIENT_ID': ',
'OAUTH2_CLIENT_SECRET': '',
'OAUTH2_TOKEN_URL': 'https://pocketid.domain.org/api/oidc/token/',
'OAUTH2_AUTHORIZATION_URL': 'https://pocketid.domain.org/authorize/',
'OAUTH2_SERVER_METADATA_URL': 'https://pocketid.domain.org/.well-known/openid-configuration',
'OAUTH2_PKCE': False,
'OAUTH2_API_BASE_URL': 'https://pocketid.domain.org/',
'OAUTH2_USERINFO_ENDPOINT': 'https://pocketid.domain.org/api/oidc/userinfo/',
'OAUTH2_SCOPE': 'openid email profile',
'OAUTH2_BUTTON_COLOR': '#0000ff',
'OAUTH2_USERNAME_CLAIM': 'preferred_username',
'OAUTH2_AUTO_CREATE_USER': True,
#'OAUTH2_ADDITIONAL_CLAIMS': {'email'},
'OAUTH2_ADDITIONAL_CLAIMS': None,
#'OAUTH2_LOGOUT_URL': 'https://auth.domain.org/application/o/pgadmin/end-session/',
'OAUTH2_SSL_CERT_VERIFICATION': True

After I successfully authenticate with pocketid, the following error is returned in the browser:
{"success":0,"errormsg":"Invalid JSON Web Key Set","info":"","result":null,"data":null}

I'm not convinced I'm setting the correct callback url. I'm using the same url for what authentik calls the redirect URI.
There is no setting in pgadmin for the Certificate URL and I'm assuming OAUTH2_SERVER_METADATA_URL is the same as OIDC Discovery URL.

Any configuration help would be appreciated.

Originally created by @dhop90 on GitHub. ### Reproduction steps I have been able to setup the pocketid app and configure users and add passkeys as well as log in. I'm have an issue setting up an initial client and looking for more configuration help and examples. I'm using pgadmin as my first configuration client. One reason is that it allows for configuring multiple OIDC providers. I currently have pgamdin successfully configured for Authentik. ### Expected behavior I'm able to configure pgadmin and other clients to use pocketid ### Actual Behavior I'm not able to configure pgadmin as a client. Current pocketid configuration for pgadmin client: callback URL : https://pgadmin.domain.org/oauth2/authorize pgadmin config: 'OAUTH2_NAME': 'PocketID', 'OAUTH2_DISPLAY_NAME': 'PocketID', 'OAUTH2_CLIENT_ID': '<removed>, 'OAUTH2_CLIENT_SECRET': '<removed>', 'OAUTH2_TOKEN_URL': 'https://pocketid.domain.org/api/oidc/token/', 'OAUTH2_AUTHORIZATION_URL': 'https://pocketid.domain.org/authorize/', 'OAUTH2_SERVER_METADATA_URL': 'https://pocketid.domain.org/.well-known/openid-configuration', 'OAUTH2_PKCE': False, 'OAUTH2_API_BASE_URL': 'https://pocketid.domain.org/', 'OAUTH2_USERINFO_ENDPOINT': 'https://pocketid.domain.org/api/oidc/userinfo/', 'OAUTH2_SCOPE': 'openid email profile', 'OAUTH2_BUTTON_COLOR': '#0000ff', 'OAUTH2_USERNAME_CLAIM': 'preferred_username', 'OAUTH2_AUTO_CREATE_USER': True, #'OAUTH2_ADDITIONAL_CLAIMS': {'email'}, 'OAUTH2_ADDITIONAL_CLAIMS': None, #'OAUTH2_LOGOUT_URL': 'https://auth.domain.org/application/o/pgadmin/end-session/', 'OAUTH2_SSL_CERT_VERIFICATION': True After I successfully authenticate with pocketid, the following error is returned in the browser: {"success":0,"errormsg":"Invalid JSON Web Key Set","info":"","result":null,"data":null} I'm not convinced I'm setting the correct callback url. I'm using the same url for what authentik calls the redirect URI. There is no setting in pgadmin for the Certificate URL and I'm assuming OAUTH2_SERVER_METADATA_URL is the same as OIDC Discovery URL. Any configuration help would be appreciated.
OVERLORD added the bug label 2025-10-08 00:11:28 +03:00
Author
Owner

@stonith404 commented on GitHub:

Does pgadmin log anything when you do this request in the container logs?

@stonith404 commented on GitHub: Does pgadmin log anything when you do this request in the container logs?
Author
Owner

@stonith404 commented on GitHub:

Pgadmin uses the library "autlib" and I have found a issue that might be related (https://github.com/lepture/authlib/issues/462). Which version of pgadmin are you using?

@stonith404 commented on GitHub: Pgadmin uses the library "autlib" and I have found a issue that might be related (https://github.com/lepture/authlib/issues/462). Which version of pgadmin are you using?
Author
Owner

@stonith404 commented on GitHub:

I've found the issue, I'll keep you up to date.

@stonith404 commented on GitHub: I've found the issue, I'll keep you up to date.
Author
Owner

@stonith404 commented on GitHub:

Ok thanks, then this is probably not the issue. I'm looking into it further tomorrow.

@stonith404 commented on GitHub: Ok thanks, then this is probably not the issue. I'm looking into it further tomorrow.
Author
Owner

@dhop90 commented on GitHub:

I'm running docker image dpage/pgadmin4, specifically:
Version 8.10
Application Mode Server
Commit: ab25238f17bd52aa361db487a94435e97beb62c6 2024-07-29
Browser Chrome 127.0.0.0
Operating System Alpine Linux v3.20, Linux-6.1.21-v8+-aarch64-with

8.10 appears to be the latest version

@dhop90 commented on GitHub: I'm running docker image dpage/pgadmin4, specifically: Version 8.10 Application Mode Server Commit: ab25238f17bd52aa361db487a94435e97beb62c6 2024-07-29 Browser Chrome 127.0.0.0 Operating System Alpine Linux v3.20, Linux-6.1.21-v8+-aarch64-with 8.10 appears to be the latest version
Author
Owner

@stonith404 commented on GitHub:

Okay strange. You can create one issue but please make sure to include as many information as possible for all errors that occur on the clients.

@stonith404 commented on GitHub: Okay strange. You can create one issue but please make sure to include as many information as possible for all errors that occur on the clients.
Author
Owner

@dhop90 commented on GitHub:

Thanks, the development image seems to work for pgadmin. I've tested with 4 other clients and can't get them to work. Should I create a separate issue for each one?

@dhop90 commented on GitHub: Thanks, the development image seems to work for pgadmin. I've tested with 4 other clients and can't get them to work. Should I create a separate issue for each one?
Author
Owner

@stonith404 commented on GitHub:

The issue should be resolved now. I’ll release the fix ASAP after completing some additional testing. However, if you’d like to try it out immediately, you can use the stonith404/pocket-id:development image, where the update is already available.

@stonith404 commented on GitHub: The issue should be resolved now. I’ll release the fix ASAP after completing some additional testing. However, if you’d like to try it out immediately, you can use the `stonith404/pocket-id:development` image, where the update is already available.
Author
Owner

@stonith404 commented on GitHub:

This should be fixed in the latest version.

@stonith404 commented on GitHub: This should be fixed in the latest version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#501