diff options
author | enahum <nahumhbl@gmail.com> | 2016-08-30 14:40:30 -0300 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-08-30 13:40:30 -0400 |
commit | 18808faead1b7bcdf27dab06e2ffcda1f0680979 (patch) | |
tree | 6a657befe66874598305bad2850c4a62c63e1764 /webapp/components/authorize.jsx | |
parent | 6c8746dbdc01e5f2b79152e2e495e914c5a9743d (diff) | |
download | chat-18808faead1b7bcdf27dab06e2ffcda1f0680979.tar.gz chat-18808faead1b7bcdf27dab06e2ffcda1f0680979.tar.bz2 chat-18808faead1b7bcdf27dab06e2ffcda1f0680979.zip |
PLT-3994 Fix OAuth2: Properly handle allowing an app fails (#3888)
* PLT-3994 Fix OAuth2: Properly handle allowing an app fails
* Remove Content-Type from allowOAuth
Diffstat (limited to 'webapp/components/authorize.jsx')
-rw-r--r-- | webapp/components/authorize.jsx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/webapp/components/authorize.jsx b/webapp/components/authorize.jsx index 354b51ede..684bae589 100644 --- a/webapp/components/authorize.jsx +++ b/webapp/components/authorize.jsx @@ -2,9 +2,9 @@ // See License.txt for license information. import Client from 'client/web_client.jsx'; +import FormError from 'components/form_error.jsx'; import {FormattedMessage, FormattedHTMLMessage} from 'react-intl'; - import React from 'react'; import icon50 from 'images/icon50x50.png'; @@ -52,8 +52,8 @@ export default class Authorize extends React.Component { window.location.href = data.redirect; } }, - () => { - //Do nothing on error + (err) => { + this.setState({error: err.message}); } ); } @@ -75,6 +75,15 @@ export default class Authorize extends React.Component { icon = icon50; } + let error; + if (this.state.error) { + error = ( + <div className='prompt__error form-group'> + <FormError error={this.state.error}/> + </div> + ); + } + return ( <div className='container-fluid'> <div className='prompt'> @@ -137,6 +146,7 @@ export default class Authorize extends React.Component { /> </button> </div> + {error} </div> </div> ); |