forked from remote/oauth2
oauth2: support device flow
Device Authorization Grant following RFC 8628 https://datatracker.ietf.org/doc/html/rfc8628
Tested with GitHub
Fixes #418
Fixes golang/go#58126
Co-authored-by: cmP <centimitr@gmail.com>
Change-Id: Id588867110c6a5289bf1026da5d7ead88f9c7d14
GitHub-Last-Rev: 9a126d7b53
GitHub-Pull-Request: golang/oauth2#609
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/450155
Commit-Queue: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Matt Hickford <matt.hickford@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
This commit is contained in:
@@ -55,8 +55,9 @@ var Fitbit = oauth2.Endpoint{
|
||||
|
||||
// GitHub is the endpoint for Github.
|
||||
var GitHub = oauth2.Endpoint{
|
||||
AuthURL: "https://github.com/login/oauth/authorize",
|
||||
TokenURL: "https://github.com/login/oauth/access_token",
|
||||
AuthURL: "https://github.com/login/oauth/authorize",
|
||||
TokenURL: "https://github.com/login/oauth/access_token",
|
||||
DeviceAuthURL: "https://github.com/login/device/code",
|
||||
}
|
||||
|
||||
// GitLab is the endpoint for GitLab.
|
||||
@@ -69,6 +70,7 @@ var GitLab = oauth2.Endpoint{
|
||||
var Google = oauth2.Endpoint{
|
||||
AuthURL: "https://accounts.google.com/o/oauth2/auth",
|
||||
TokenURL: "https://oauth2.googleapis.com/token",
|
||||
DeviceAuthURL: "https://oauth2.googleapis.com/device/code",
|
||||
}
|
||||
|
||||
// Heroku is the endpoint for Heroku.
|
||||
|
||||
Reference in New Issue
Block a user