oauth2 icon indicating copy to clipboard operation
oauth2 copied to clipboard

Support OAuth2 Device Flow

Open joeblubaugh opened this issue 5 years ago • 1 comments

I'm building an application for a limited-input device: https://developers.google.com/identity/sign-in/devices

I am building most of the "machinery" myself - clients to call the endpoint, sending a request for the ID and Refresh tokens. I'm able to crib a few things from oauth2/google like the refreshing TokenSource and the ConfigFromJSON but have been unable to use NewClient etc.

It would be ideal if some combination of oauth2 and oauth2/google supported this workflow, so the code would be more-reviewed and have an API that fits nicely into the rest of the oauth2 package. It is an OAuth2 standard extension: https://www.oauth.com/oauth2-servers/device-flow/

There is an open pull request that hasn't received a response: #356

Who is the Google maintainer for this package? I know @bradfitz no longer manages it.

joeblubaugh avatar Apr 23 '20 05:04 joeblubaugh

I think this is the last actual PR https://github.com/golang/oauth2/pull/578 I'm interested in this issue let's finish it 🤝

sealbro avatar Oct 31 '22 16:10 sealbro

Is there any known alternative until this topic is resolved?

Edit: Found https://github.com/zitadel/oidc/blob/main/example/client/device/device.go

jkroepke avatar May 21 '23 19:05 jkroepke

Is there any known alternative until this topic is resolved?

Edit: Found https://github.com/zitadel/oidc/blob/main/example/client/device/device.go

https://github.com/cli/oauth and https://github.com/int128/oauth2dev

GreyXor avatar Jun 26 '23 10:06 GreyXor

Proposal accepted, implementation ready for review at https://go-review.googlesource.com/c/oauth2/+/450155

hickford avatar Jul 20 '23 07:07 hickford