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
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
6c8746dbdc
Коммит
18808faead
@@ -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>
|
||||
);
|
||||
|
||||
Ссылка в новой задаче
Block a user