mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
🚀 Feature: allow to set artbitrary Cliend-ID #231
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @savely-krasovsky on GitHub.
Feature description
Currently you cannot do it, since Pocket-ID automatically generates random UUID. Unfortunately there are apps which require to create exact Client IDs to work. Excellent example is OpenCloud: their desktop and mobile app has hard-coded IDs which they list in the doc: https://docs.opencloud.eu/docs/admin/configuration/authentication-and-user-management/external-idp
Pitch
It will allow to support some setups I described above.
@stonith404 commented on GitHub:
Fair enough. For mobile applications this would make sense.
@savely-krasovsky commented on GitHub:
Client registration will work, but it's more enterprise setup in my opinion. It's much simpler to just allow arbitrary Client-ID. In my case it works flawlessly.
@stonith404 commented on GitHub:
It's recommended that the client ID is random:
In my opinion this is a wrong implementation on Opencloud's side, client IDs shouldn't be set manually. If you really have to set a custom client ID, you have to do it manually in the database.
@savely-krasovsky commented on GitHub:
@stonith404 I agree, though you usually cannot change Client-ID which is hard-coded into mobile applications. Making it configurable in app's UI? Questionable, it should rather use OAuth 2.0 Dynamic Client Registration Protocol which Pocket-ID is also doesn't support AFAIK. It seems reasonable for mobile applications at least, IMO.
Database trick is the first thing I did, hopefully Pocket-ID didn't have any strict requirements.
@BEBU88 commented on GitHub:
I'm also interested in setting up Opencloud Clients. I just read that all of their clients support Dynamic Client Registration: https://github.com/opencloud-eu/desktop/issues/246#issuecomment-2857476676
@Tarow commented on GitHub:
In addition to the client_id, itd be great if we can also set the client_secret.
This would allow declarative provisioning of OIDC clients in PocketID and configuration of the clients itself (say Traefik).
Would be very handy when using the Rest API directly or through the Terraform Provider for example.
@kmendell commented on GitHub:
@MorrisMorrison Feel free to implement what you think would work, but keep in mind the goal of our UI. "To stay simple" we dont want to clutter it up that much. If you try this we can always tweak the UI to make sure it stays simple.
@MorrisMorrison commented on GitHub:
Hi,
I would like to take a look at this feature.
How do we want to display this option in the UI?
I was thinking about adding a simple toggle "Auto-generate ClientID" to the oidc-client form in settings, which is always true by default. Once turned off, we display a text input to be able to set an arbitrary client id.
Looking at the current layout it would probably fit nicely next to the name input.
We could also move it to the advanced options, since it's primarily needed for specific integration scenarios rather than typical usage.
@kmendell commented on GitHub:
@MorrisMorrison Thinking more it should probably go in the advanced options, thats a good call.