mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-05 00:39:38 +03:00
🐛 Bug Report: Device Code flow should not require a client secret #335
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 @ItalyPaleAle on GitHub (Jun 9, 2025).
Reproduction steps
When using the Device Code flow with Pocket ID, calls to the
/api/oidc/device/authorizerequire aclient_secretExpected behavior
Per RFC 8628 sec 3.1 the device authorization request endpoint should not require a client secret. This is because clients are assumed to be public.
Section 5.6 calls this out:
Actual Behavior
Client secret is required
Version and Environment
main branch
Log Output
No response
@kmendell commented on GitHub (Jun 9, 2025):
Correct, You need to check the Public client option to use the device code properly. Im not sure this is a bug but maybe a documentation issue, as when if a public client is used everything works correctly.
@ItalyPaleAle commented on GitHub (Jun 9, 2025):
Right now it's possible to pass a client secret and the
OidcDeviceAuthorizationRequestDtostruct has a property for it. And if you pass one, it's validated. Should maybe be removed entirely, and throw an error if client isn't public?@stonith404 commented on GitHub (Jun 9, 2025):
Clients that use the device code flow can also be confidential, and if they are, they require a client secret. In section 3.1:
This probably means that we would also have to implement federated client credentials for this endpoint, right?
@ItalyPaleAle commented on GitHub (Jun 9, 2025):
Thanks I missed that paragraph. Yes we would need to add federated credentials there too, I can update my latest PR.