Skip to content

Commit

Permalink
endpoints: add GitLab DeviceAuthURL
Browse files Browse the repository at this point in the history
  • Loading branch information
hickford committed Jul 22, 2024
1 parent 6d8340f commit 6ecd45e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 3 additions & 2 deletions endpoints/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ var GitHub = oauth2.Endpoint{

// GitLab is the endpoint for GitLab.
var GitLab = oauth2.Endpoint{
AuthURL: "https://gitlab.com/oauth/authorize",
TokenURL: "https://gitlab.com/oauth/token",
AuthURL: "https://gitlab.com/oauth/authorize",
TokenURL: "https://gitlab.com/oauth/token",
DeviceAuthURL: "https://gitlab.com/oauth/authorize_device",
}

// Google is the endpoint for Google.
Expand Down
7 changes: 2 additions & 5 deletions gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
package gitlab // import "golang.org/x/oauth2/gitlab"

import (
"golang.org/x/oauth2"
"golang.org/x/oauth2/endpoints"
)

// Endpoint is GitLab's OAuth 2.0 endpoint.
var Endpoint = oauth2.Endpoint{
AuthURL: "https://gitlab.com/oauth/authorize",
TokenURL: "https://gitlab.com/oauth/token",
}
var Endpoint = endpoints.GitLab

0 comments on commit 6ecd45e

Please sign in to comment.