diff --git a/api/user.go b/api/user.go index a9c8a0065a..5aba21e79e 100644 --- a/api/user.go +++ b/api/user.go @@ -1224,17 +1224,17 @@ func getStatuses(c *Context, w http.ResponseWriter, r *http.Request) { } func GetAuthorizationCode(c *Context, w http.ResponseWriter, r *http.Request, service, redirectUri string) { + params := mux.Vars(r) + teamName := params["team"] - teamId := r.FormValue("id") - - if len(teamId) != 26 { - c.Err = model.NewAppError("GetAuthorizationCode", "Invalid team id", "team_id="+teamId) + if len(teamName) == 0 { + c.Err = model.NewAppError("GetAuthorizationCode", "Invalid team name", "team_name="+teamName) c.Err.StatusCode = http.StatusBadRequest return } // Make sure team exists - if result := <-Srv.Store.Team().Get(teamId); result.Err != nil { + if result := <-Srv.Store.Team().GetByName(teamName); result.Err != nil { c.Err = result.Err return } @@ -1249,7 +1249,7 @@ func GetAuthorizationCode(c *Context, w http.ResponseWriter, r *http.Request, se endpoint := utils.Cfg.SSOSettings[service].AuthEndpoint state := model.HashPassword(clientId) - authUrl := endpoint + "?response_type=code&client_id=" + clientId + "&redirect_uri=" + url.QueryEscape(redirectUri+"?id="+teamId) + "&state=" + url.QueryEscape(state) + authUrl := endpoint + "?response_type=code&client_id=" + clientId + "&redirect_uri=" + url.QueryEscape(redirectUri+"?team="+teamName) + "&state=" + url.QueryEscape(state) http.Redirect(w, r, authUrl, http.StatusFound) } diff --git a/config/config.json b/config/config.json index f92b873d16..84e675a72f 100644 --- a/config/config.json +++ b/config/config.json @@ -26,8 +26,8 @@ "SSOSettings": { "gitlab": { "Allow": true, - "Secret" : "8526ada64f38a1a67cafe6650d54310f1484f8a5d06ad23abb9f8e4b8af1c429", - "Id": "0af4138195d246d5d4e958a93100379066bb087fa9892cd323b0c97bbd696008", + "Secret" : "0495d3d6e528d91ba46605622a3645a8409ac5971ee287b1c3a6519fe27e6f6a", + "Id": "87a4aeb746c67e87a54df78f6eccf85229dd30a3a797bfdb423b82ba4e749cd0", "AuthEndpoint": "http://dockerhost:8080/oauth/authorize", "TokenEndpoint": "http://dockerhost:8080/oauth/token", "UserApiEndpoint": "http://dockerhost:8080/api/v3/user" diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index 3fdaac32b3..908e10f314 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -113,7 +113,7 @@ module.exports = React.createClass({
{"Choose your username and password for the " + this.props.team_name + " " + strings.Team +"."}
+{"Choose your username and password for the " + this.props.teamDisplayName + " " + strings.Team} {"or sign up with GitLab."}
Your username can be made of lowercase letters and numbers.
{"To continue signing up with " + this.state.user.auth_type + ", please register a username."}
+{"To continue signing up with " + this.state.user.auth_service + ", please register a username."}
Your username can be made of lowercase letters and numbers.
{"Pick something " + strings.Team + "mates will recognize. Your username is how you will appear to others"}
+{"Pick something " + strings.Team + "mates will recognize. Your username is how you will appear to others."}
{ yourEmailIs } You’ll use this address to sign in to {config.SiteName}.
diff --git a/web/react/pages/signup_user_complete.jsx b/web/react/pages/signup_user_complete.jsx index a24c8d4c85..490702d3cb 100644 --- a/web/react/pages/signup_user_complete.jsx +++ b/web/react/pages/signup_user_complete.jsx @@ -3,9 +3,9 @@ var SignupUserComplete =require('../components/signup_user_complete.jsx'); -global.window.setup_signup_user_complete_page = function(email, domain, name, id, data, hash) { +global.window.setup_signup_user_complete_page = function(email, name, ui_name, id, data, hash) { React.render( -