git.iko.soy/typeable/oauth2-proxy
on master help sign in
Merge pull request #137 from guotie/master

Update github.go

commitba81a0d30abd1cac1c294758bf196a4a5cd163ff authorJehiah Czebotar <jehiah@gmail.com> dateTue 25 Aug 2015, 12:22 (11 years ago) parent7ba51ba8da7325
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",