mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-11 07:32:57 +03:00
🐛 Bug Report: Device Code flow should not require a client secret #171
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.
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
@ItalyPaleAle commented on GitHub:
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?@kmendell commented on GitHub:
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.
@stonith404 commented on GitHub:
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:
Thanks I missed that paragraph. Yes we would need to add federated credentials there too, I can update my latest PR.