Commit b7c95b0
committed
Fix device code login to send empty client_id
RSTS bakes its built-in ApplicationClientId into the JWT clientIdClaim
when the user completes the flow via the verification_uri_complete URL
(LoginController.ProcessDeviceLogin reads client_id from the query
string, but verification_uri_complete contains no client_id query param,
and Login.js skips StartDeviceCodeFlow when device= is already in the
URL, so the cached client_id never gets re-injected). The polling check
in OAuthTokenManager.CreateAccessTokenFromAuthCode then compares the
baked-in ApplicationClientId against the cached client_id we sent, and
rejects with invalid_request.
Sending an empty client_id makes RSTS normalize both sides to
ApplicationClientId, so both browser flows (verification_uri_complete
and manual user_code entry) succeed end-to-end.
Non-empty client_id values still work, but only when the appliance has
a matching RelyingPartyApplication registered. Documented this caveat
on DeviceCodeLoginParameters.ClientId.1 parent 2017eda commit b7c95b0
2 files changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | | - | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
0 commit comments