mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 15:30:37 +05:30
oauth init by guest hotfix
This commit is contained in:
parent
ced721af24
commit
edb027a6a5
@ -166,6 +166,13 @@ export function oAuthComplete(params = {}) {
|
||||
typeof params.accept === 'undefined' ? {} : {accept: params.accept}
|
||||
)
|
||||
.then((resp) => {
|
||||
if (resp.status === 401 && resp.name === 'Unauthorized') {
|
||||
// TODO: temporary solution for oauth init by guest
|
||||
// TODO: request serivce should handle http status codes
|
||||
dispatch(routeActions.push('/oauth/permissions'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (resp.redirectUri) {
|
||||
location.href = resp.redirectUri;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user