summaryrefslogtreecommitdiffstats
path: root/api/oauth.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/oauth.go')
-rw-r--r--api/oauth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/oauth.go b/api/oauth.go
index 659d5c129..25d4a89f9 100644
--- a/api/oauth.go
+++ b/api/oauth.go
@@ -285,7 +285,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
action := props["action"]
switch action {
case model.OAUTH_ACTION_SIGNUP:
- if user, err := app.CreateOAuthUser(service, body, teamId); err != nil {
+ if user, err := app.CreateOAuthUser(service, body, teamId, c.GetSiteURL()); err != nil {
c.Err = err
} else {
doLogin(c, w, r, user, "")
@@ -297,7 +297,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
case model.OAUTH_ACTION_LOGIN:
user := LoginByOAuth(c, w, r, service, body)
if len(teamId) > 0 {
- c.Err = app.AddUserToTeamByTeamId(teamId, user)
+ c.Err = app.AddUserToTeamByTeamId(teamId, user, c.GetSiteURL())
}
if c.Err == nil {
if val, ok := props["redirect_to"]; ok {