-
Notifications
You must be signed in to change notification settings - Fork 38
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
[Feature Request] Support OAuth2 Device code authorisation flow #97
Comments
I would be happy to add the Device Authorization Flow. But I would have to implement this more or less according to the spec. If the Postman examples from Microsoft Identity Server are executable I can test it, otherwise I may need your help. |
And thanks for the site. Here is also PKCE for Authorization_Code Flow described:-) |
Yeah, I scripted it manually with on request script hooks. Device code auth is how I usually authenticate with powershell and console apps. So you don't have to have an actual device change. |
Nice. Then I would open a Notificatian with the user_code and verification:_uri and a button, which then opens the verifcation_uri. |
Can you add another button to copy the user_code to the clipboard? |
Unfortunately, I have not been able to fully test the Device_Code Flow. The request after device_code and the user_code works. It also opens the web page and the user_code is in the clipboard. But unfortunately I don't have a valid account for Microsoft and so I can only test the wait loop until expired_token. But I do not have a successful call yet. I would ask you, once I have created the version, to test this case and give me feedback. |
Sure, I'd be happy to help! |
A code review would be nice. You implemented it already and may spot a mistake. |
Sure, while scripting and integrating my scripts with httpyac, I have already familiarised myself with the code base and I am comfortable with reading TypeScript. Just point me to a publicly accessible branch and I'll take a look and test during the weekend or early next week. |
I did not make an extra branch. It is about the commits attached to the issue, or actually about the class |
Yeah I usually just check for auth pending error and would display all other errors to the user. I see you inlcuded the slow down error handling as well. Maybe call showNote or showWarning with the error message and continue polling or cancel based on user input |
@AnWeber I think this looks great! I tested it with Microsoft Identity platform and it works like a charm! As expected it keeps the session and even picks up the I also managed to recompile the VS Code extension with the new code and tested the UI features of the flow. Everything checks out fine! 👍 |
Super. Thanks for the effort in setting up the project locally. I have released version 4.6.0 which includes the change. |
I would like httpyac to support the OAuth 2.0 Device authorization grant for the openid variable replacer.
Ref. RFC8628
Example of usage: Microsoft Identity platform
Proposal for httpyac:
Reason:
This is a great way of authenticating using applications where you cannot/don't want to modify the redirect Url, and don't have access to/don't want to leak the client secret. And contrary to the implicit and hybrid authorization flows, the device code flow hasn't been deprecated by the OAuth standard and best practices.
The text was updated successfully, but these errors were encountered: