-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
OAuth device flow #5
Comments
Blocked by library supprt golang/oauth2#418 (Go proposal golang/go#58126) Workaround: use Git Credential Manager https://github.com/GitCredentialManager/git-credential-manager |
We need this for BitBucket, as we'll intend to use this one some systems where it's all CLI access via SSH, with no local browser. It looks like even though BitBucket doesn't support a device flow, we could emulate it by using an implicit grant:
and possibly host a static page (on GitHub Pages?) that takes the access token & displays it on screen, similar to the device grant flow from Google / GitHub, for copy/paste entry via SSH. I may fork & implement this - any thoughts before I do? |
I realised afterwards that the OAuth2 device flow was quite a bit different to what we'd have to implement for this kind of interaction to work on BitBucket, so sorry for the initial confusion. I have got a version working, with both your Device Auth implementation for GitHub, and a copy/paste solution for BitBucket: In the process, I made it fall back to device authentication if it couldn't open the browser automatically (suggesting headless operation), and for our use case, store the credentials to file. |
OAuth 2.0 Device Authorization Grant https://www.rfc-editor.org/rfc/rfc8628
Necessary for headless systems
The text was updated successfully, but these errors were encountered: