Skip to content

Commit

Permalink
Scopes len check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jleagle committed Nov 1, 2022
1 parent 76e7a50 commit c23c9e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions providers/patreon/patreon.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,11 @@ func newConfig(p *Provider, scopes []string) *oauth2.Config {
ScopeIdentityEmail: {},
}

for _, scope := range scopes {
if _, exists := defaultScopes[scope]; !exists {
if len(scopes) > 0 {
for _, scope := range scopes {
c.Scopes = append(c.Scopes, scope)
}
}

return c
}

Expand Down

0 comments on commit c23c9e3

Please sign in to comment.