mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix login redirection issue in APPM Store UI
This commit is contained in:
parent
6d16259aaf
commit
5153feae40
@ -101,7 +101,12 @@ class NormalLoginForm extends React.Component {
|
|||||||
axios.post(window.location.origin + config.serverConfig.loginUri, request
|
axios.post(window.location.origin + config.serverConfig.loginUri, request
|
||||||
).then(res => {
|
).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
window.location = window.location.origin+ "/store";
|
let redirectUrl = window.location.origin + "/store";
|
||||||
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
|
if (searchParams.has("redirect")) {
|
||||||
|
redirectUrl = searchParams.get("redirect");
|
||||||
|
}
|
||||||
|
window.location = redirectUrl;
|
||||||
}
|
}
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
handleApiError(error, "Error occurred while trying to load groups.");
|
handleApiError(error, "Error occurred while trying to load groups.");
|
||||||
@ -158,7 +163,8 @@ class NormalLoginForm extends React.Component {
|
|||||||
)}
|
)}
|
||||||
<br/>
|
<br/>
|
||||||
<a className="login-form-forgot" href="">Forgot password</a>
|
<a className="login-form-forgot" href="">Forgot password</a>
|
||||||
<Button loading={this.state.loading} block type="primary" htmlType="submit" className="login-form-button">
|
<Button loading={this.state.loading} block type="primary" htmlType="submit"
|
||||||
|
className="login-form-button">
|
||||||
Log in
|
Log in
|
||||||
</Button>
|
</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user