Changeset - 4eedf6e60a1a
[Not reviewed]
0 1 0
Jan Kaluza - 10 years ago 2016-01-25 07:42:10
jkaluza@redhat.com
Slack: Use access_token to get initial team name
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
spectrum/src/frontends/slack/SlackUserRegistration.cpp
Show inline comments
 
@@ -68,7 +68,7 @@ std::string SlackUserRegistration::createOAuth2URL(const std::vector<std::string
 
						  "https://slack.com/oauth/authorize",
 
						  "https://slack.com/api/oauth.access",
 
						  redirect_url,
 
						  "bot");
 
						  "channels:read channels:write team:read im:read im:write chat:write:bot bot");
 
	std::string url = oauth2->generateAuthURL();
 

	
 
	m_auths[oauth2->getState()] = oauth2;
 
@@ -137,7 +137,7 @@ std::string SlackUserRegistration::handleOAuth2Code(const std::string &code, con
 
		}
 
	}
 

	
 
	std::string domain = getTeamDomain(token);
 
	std::string domain = getTeamDomain(access_token);
 
	if (domain.empty()) {
 
		return "The token you have provided is invalid";
 
	}
0 comments (0 inline, 0 general)