-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Add "Device Code" as a supported OAuth Flow #2381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@LikeLakers2 could you have a go at making a PR for this? |
@philsturgeon Although I've never written anything of a specification before (aside from some notes in Notepad), I think I could give it a shot. It doesn't sound too hard, considering what little I think I'd have to add. Also it's good experience for writing a specification. :) |
Is there any information available on when this will be formally supported in the OpenAPI spec? |
@handrews looks it has been merged, it should be good ? or does the ticket kept open till version 3.2 is released ? |
@LasneF we can close it - I don't always remember to check if the PR merging automatically closed the issue, thanks for noticing! |
Hi! I'm not in the business of making APIs myself, so I don't know how helpful I can be. However, I found that RFC8628 offers a "Device Code" type of OAuth, which I thought might be useful if it were supported by default by OpenAPI. The flow is described at https://oauth.net/2/grant-types/device-code/ as follows:
Looking at the RFC myself, it seems like this type of OAuth Flow would need the a device authorization URL (different from a regular
authorizationUrl
in that this is called by the application, not the user -- the RFC has more info under section 3.1), atokenUrl
, and potentially arefreshUrl
.Given how this endpoint works, it may also benefit from a optional(Turns out I was misreading the RFC -- the authorization server generates the device code, not the client)deviceCodeFormat
field, specifying what characters are allowed, how the code can be formatted (uppercase? lowercase? case-insensitive? etc.) and so on.Hopefully this isn't too far-fetched of a suggestion! :)
The text was updated successfully, but these errors were encountered: