summaryrefslogtreecommitdiffstats
path: root/webapp/components/authorize.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/authorize.jsx')
-rw-r--r--webapp/components/authorize.jsx16
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>
);