Skip to content

Commit

Permalink
Identify or Email scope is required. Add if not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
123FLO321 authored Aug 29, 2019
1 parent 95fbc22 commit e577cfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/CredentialsDiscord/CredentialsDiscord.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ public class CredentialsDiscord: CredentialsPluginProtocol {
}

private func getScopeParameters() -> String {
var scopes = self.scopes
if !scopes.contains("identify") && !scopes.contains("email") {
scopes.append("identify")
}

var scopeParameters = "&scope="
for scope in scopes {
// space delimited list: https://discordapp.com/developers/docs/topics/oauth2#authorization-code-grant
Expand Down

0 comments on commit e577cfb

Please sign in to comment.