summaryrefslogtreecommitdiffstats
path: root/api4/oauth.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2017-07-06 17:28:38 -0400
committerJoramWilander <jwawilander@gmail.com>2017-07-06 17:28:38 -0400
commit15ad24d160cb4604d0605ebbfa53d11a57820706 (patch)
treed33ee5e1d756586ac171b07d6ce31febee565485 /api4/oauth.go
parent3d382cfa0e01938a24578602777325fe7fccd0c1 (diff)
downloadchat-15ad24d160cb4604d0605ebbfa53d11a57820706.tar.gz
chat-15ad24d160cb4604d0605ebbfa53d11a57820706.tar.bz2
chat-15ad24d160cb4604d0605ebbfa53d11a57820706.zip
Minor fix
Diffstat (limited to 'api4/oauth.go')
-rw-r--r--api4/oauth.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/api4/oauth.go b/api4/oauth.go
index 402651b92..d00b4a666 100644
--- a/api4/oauth.go
+++ b/api4/oauth.go
@@ -400,7 +400,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
uri := c.GetSiteURLHeader() + "/signup/" + service + "/complete"
- body, teamId, props, err := app.AuthorizeOAuthUser(service, code, state, uri)
+ body, teamId, props, err := app.AuthorizeOAuthUser(w, r, service, code, state, uri)
if err != nil {
c.Err = err
return
@@ -455,7 +455,7 @@ func loginWithOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if authUrl, err := app.GetOAuthLoginEndpoint(c.Params.Service, teamId, model.OAUTH_ACTION_LOGIN, redirectTo, loginHint); err != nil {
+ if authUrl, err := app.GetOAuthLoginEndpoint(w, r, c.Params.Service, teamId, model.OAUTH_ACTION_LOGIN, redirectTo, loginHint); err != nil {
c.Err = err
return
} else {
@@ -475,7 +475,7 @@ func mobileLoginWithOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if authUrl, err := app.GetOAuthLoginEndpoint(c.Params.Service, teamId, model.OAUTH_ACTION_MOBILE, "", ""); err != nil {
+ if authUrl, err := app.GetOAuthLoginEndpoint(w, r, c.Params.Service, teamId, model.OAUTH_ACTION_MOBILE, "", ""); err != nil {
c.Err = err
return
} else {
@@ -500,7 +500,7 @@ func signupWithOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if authUrl, err := app.GetOAuthSignupEndpoint(c.Params.Service, teamId); err != nil {
+ if authUrl, err := app.GetOAuthSignupEndpoint(w, r, c.Params.Service, teamId); err != nil {
c.Err = err
return
} else {