diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-08-18 08:47:35 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-08-18 08:47:35 -0400 |
commit | 2f1dcf6f5267ecf85d14c8a36a9d3059a5d41218 (patch) | |
tree | 1de5578c9050a33635960fc046fdf97339254be0 /web/react/components/signup_user_complete.jsx | |
parent | 96d1eb1c800a427e31e63970e57d0824a3bc91e3 (diff) | |
parent | a7f09be9783f3354ab38d4fb4fb82085241d018f (diff) | |
download | chat-2f1dcf6f5267ecf85d14c8a36a9d3059a5d41218.tar.gz chat-2f1dcf6f5267ecf85d14c8a36a9d3059a5d41218.tar.bz2 chat-2f1dcf6f5267ecf85d14c8a36a9d3059a5d41218.zip |
Merge pull request #381 from mattermost/mm-1705
MM-1705 add google as an oauth single-sign-on service
Diffstat (limited to 'web/react/components/signup_user_complete.jsx')
-rw-r--r-- | web/react/components/signup_user_complete.jsx | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx index b21553d8a..0393e0413 100644 --- a/web/react/components/signup_user_complete.jsx +++ b/web/react/components/signup_user_complete.jsx @@ -5,6 +5,7 @@ var utils = require('../utils/utils.jsx'); var client = require('../utils/client.jsx'); var UserStore = require('../stores/user_store.jsx'); var BrowserStore = require('../stores/browser_store.jsx'); +var Constants = require('../utils/constants.jsx'); module.exports = React.createClass({ handleSubmit: function(e) { @@ -151,19 +152,34 @@ module.exports = React.createClass({ // add options to log in using another service var authServices = JSON.parse(this.props.authServices); - var signupMessage = null; - if (authServices.indexOf('gitlab') >= 0) { - signupMessage = ( - <div> + var signupMessage = []; + if (authServices.indexOf(Constants.GITLAB_SERVICE) >= 0) { + signupMessage.push( <a className='btn btn-custom-login gitlab' href={'/' + this.props.teamName + '/signup/gitlab' + window.location.search}> <span className='icon' /> <span>with GitLab</span> </a> + ); + } + + if (authServices.indexOf(Constants.GOOGLE_SERVICE) >= 0) { + signupMessage.push( + <a className='btn btn-custom-login google' href={'/' + this.props.teamName + '/signup/google' + window.location.search}> + <span className='icon' /> + <span>with Google</span> + </a> + ); + } + + if (signupMessage.length > 0) { + signupMessage = ( + <div> + {signupMessage} <div className='or__container'> <span>or</span> </div> - </div> - ); + </div> + ); } var termsDisclaimer = null; |