Skip to content

fix: send client_id on the token request when no auth method is set - #161

Open
ikawalec wants to merge 1 commit into
masterfrom
fix/device-flow-client-id
Open

ikawalec wants to merge 1 commit into
masterfrom
fix/device-flow-client-id

Conversation

@ikawalec

Copy link
Copy Markdown
Contributor

Fixes #160

Device flow leaves AuthMethod empty (PromptForClientConfig only asks for it on the code/client_credentials/refresh/password/jwt-bearer grants), and AuthenticateClient switches on AuthMethod — so with no auth method the token request carried only grant_type and device_code, and the server answered invalid_client.

Fixing it in AuthenticateClient covers every caller (token, PAR), not just device flow.

Before:

POST /token  body=device_code=DC123&grant_type=urn:ietf:params:oauth:grant-type:device_code

After:

POST /token  body=client_id=my-client&device_code=DC123&grant_type=urn:ietf:params:oauth:grant-type:device_code

@ikawalec
ikawalec marked this pull request as ready for review September 10, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Device flow doesn't send client_id and doesn't work without client_secret

1 participant