Update github.go
This commit is contained in:
parent
7ba51ba9f2
commit
8da7325683
@ -17,21 +17,21 @@ type GitHubProvider struct {
|
|||||||
|
|
||||||
func NewGitHubProvider(p *ProviderData) *GitHubProvider {
|
func NewGitHubProvider(p *ProviderData) *GitHubProvider {
|
||||||
p.ProviderName = "GitHub"
|
p.ProviderName = "GitHub"
|
||||||
if p.LoginUrl.String() == "" {
|
if p.LoginUrl == nil || p.LoginUrl.String() == "" {
|
||||||
p.LoginUrl = &url.URL{
|
p.LoginUrl = &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "/login/oauth/authorize",
|
Path: "/login/oauth/authorize",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if p.RedeemUrl.String() == "" {
|
if p.RedeemUrl == nil || p.RedeemUrl.String() == "" {
|
||||||
p.RedeemUrl = &url.URL{
|
p.RedeemUrl = &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "github.com",
|
Host: "github.com",
|
||||||
Path: "/login/oauth/access_token",
|
Path: "/login/oauth/access_token",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if p.ValidateUrl.String() == "" {
|
if p.ValidateUrl == nil || p.ValidateUrl.String() == "" {
|
||||||
p.ValidateUrl = &url.URL{
|
p.ValidateUrl = &url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: "api.github.com",
|
Host: "api.github.com",
|
||||||
|
Loading…
Reference in New Issue
Block a user