Created
October 26, 2017 00:41
-
-
Save kanapuli/e2f5d9648c8dc148b0f7ed06eaa3901f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package authentication | |
//SlackAuth responses back the Login URL | |
func (LoginService) SlackAuth(ctx context.Context) (redirectURL string, err error) { | |
conf := &oauth2.Config{ | |
ClientID: slackClientID, | |
ClientSecret: slackClientSecret, | |
Scopes: slackScopes, | |
Endpoint: oauth2.Endpoint{ | |
AuthURL: slackAuthURL, | |
TokenURL: slackTokenURL, | |
}, | |
} | |
url := conf.AuthCodeURL("state", oauth2.AccessTypeOffline) | |
//fmt.Println("Visit the url to get access token of slack : ", url) | |
return string(url), nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment