Skip to content
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

endpoints: add GitLab DeviceAuthURL #733

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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