Skip to content

Device flow examples#9

Merged
EthanHeilman merged 14 commits intomainfrom
deviceflow
Apr 13, 2026
Merged

Device flow examples#9
EthanHeilman merged 14 commits intomainfrom
deviceflow

Conversation

@EthanHeilman
Copy link
Copy Markdown
Collaborator

@EthanHeilman EthanHeilman commented Dec 28, 2025

Main change

  • Adds device flow sections and examples

Minor changes

  • Adds auth code example
  • Fixes broken references to RFC8628

The code for generating the DPoP blobs examples can be found in this commit https://github.com/EthanHeilman/oidc-jwk-go/commit/2a78004016b4844a1047689b2a5e9a3b23d0dfa4

@EthanHeilman EthanHeilman marked this pull request as draft December 28, 2025 23:51
@EthanHeilman EthanHeilman marked this pull request as ready for review December 30, 2025 21:31
Copy link
Copy Markdown
Collaborator

@dickhardt dickhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread openid-connect-key-binding-1_0.md Outdated
Comment thread openid-connect-key-binding-1_0.md Outdated
```text
TBD

POST /device/code?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Section 3.1 of RFC 8628, I recommend the following changes:

  1. Query parameters should be body parameters
  2. The path should be /device_authorization to be consistent with the example from Section 3.1 of RFC 8628
  3. In Section 3.1 of draft-parecki-oauth-dpop-device-flow-00, instead of providing the JKT, the DPoP header is used instead. It might be worth a discussion on which one is better.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed 1 and 2.

All the flows in OAuth DPoP flow in RFC 9449 use JKT, I don't understand the justification for why that draft deviates from this. Since no public key has been established, is it just using the full DPoP to communicate the public key it wishes to use? I am curious now, maybe I am missing something important.

@aaronpk Do you know why a full DPOP was used here rather than the JKT?

Comment thread openid-connect-key-binding-1_0.md Outdated
Comment thread openid-connect-key-binding-1_0.md Outdated
"user_code":"059-461-148",
"verification_uri":"https://client.example.org/device",
"verification_uri_complete":"https://client.example.org/?user_code=059-461-148",
"expires_in":300000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

300000 (~83 hours) seems very long; I would prefer using 1800 (30 minutes) as in Section 3.2 of RFC8628 because values from examples often turn into the default values of future implementations.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed, changed to 1800

Copy link
Copy Markdown
Contributor

@JonasPrimbs JonasPrimbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented all suggested changes inline, mainly formatting and consistency issues to comply with other RFCs.
I also compared the Device Authorization Flow with the expired draft of Aaron and Brian. The main difference seems to be in the Device Authorization Request (providing just the dpop-jkt vs. sending a DPoP Header with the request).

With the perspective, that the DPoP-bound ID Token might not be the last DPoP-bound token ever needed in OAuth or OpenID Connect, it would be nice not having to specify the token request and token refresh over and over again. Maybe the better way would be sourcing out the DPoP-bound token request mechanisms to other specs (RFC 9449 for authorization code, draft-parecki-oauth-dpop-device-flow for the device flow, future grant type specs should include the DPoP way) and using a token exchange (RFC 8693) with or without DPoP to obtain other tokens (such as the DPoP-bound ID Token).

I will try to find some time proposing the corresponding changes for this draft next week as a pull request. I guess it would be much cleaner just describing a DPoP-bound token exchange instead of describing the authorization code flow, device authorization flow and refresh token flow.

Co-authored-by: Jonas Primbs <mail@jonasprimbs.de>
Co-authored-by: Jonas Primbs <mail@jonasprimbs.de>
@EthanHeilman
Copy link
Copy Markdown
Collaborator Author

@JonasPrimbs Addressed review comments, look it over and let me know if you are good with this PR

In terms of #12, I responded on that issue. Token exchange for single purpose ID Tokens is a great idea but out of scope for the goals of key binding. Worth creating as a separate standard.

@JonasPrimbs
Copy link
Copy Markdown
Contributor

Looks good, I think the PR is ready to merge.

@EthanHeilman EthanHeilman merged commit bdf8fde into main Apr 13, 2026
1 check passed
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.

3 participants