git.iko.soy/typeable/oauth2-proxy
on master help sign in
Update github.go
commit8da7325683120826e89e7e02a9c1643cdc21f44f author铁哥 <guotie.9@gmail.com> dateWed 26 Aug 2015, 00:11 (11 years ago) parent7ba51ba
1 file changed+3−3
providers/github.go+3−3
providers/github.go+3−3
@@ -17,21 +17,21 @@ type GitHubProvider struct {
1717
1818func NewGitHubProvider(p *ProviderData) *GitHubProvider {
1919 p.ProviderName = "GitHub"
20− if p.LoginUrl.String() == "" {
20+ if p.LoginUrl == nil || p.LoginUrl.String() == "" {
2121 p.LoginUrl = &url.URL{
2222 Scheme: "https",
2323 Host: "github.com",
2424 Path: "/login/oauth/authorize",
2525 }
2626 }
27− if p.RedeemUrl.String() == "" {
27+ if p.RedeemUrl == nil || p.RedeemUrl.String() == "" {
2828 p.RedeemUrl = &url.URL{
2929 Scheme: "https",
3030 Host: "github.com",
3131 Path: "/login/oauth/access_token",
3232 }
3333 }
34− if p.ValidateUrl.String() == "" {
34+ if p.ValidateUrl == nil || p.ValidateUrl.String() == "" {
3535 p.ValidateUrl = &url.URL{
3636 Scheme: "https",
3737 Host: "api.github.com",