mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
auth: moved them to auth
This commit is contained in:
parent
2608b2687c
commit
088236c94e
1 changed files with 5 additions and 5 deletions
|
@ -108,11 +108,6 @@ function* iframeLoginVkSaga({ viewer_id, access_token, auth_key }) {
|
|||
function* mapInitSaga() {
|
||||
const { hash } = getUrlData();
|
||||
|
||||
if (window.location.search) {
|
||||
const { viewer_id, access_token, auth_key } = yield parseQuery(window.location.search);
|
||||
if (viewer_id && access_token && auth_key) yield put(iframeLoginVk({ viewer_id, access_token, auth_key }));
|
||||
}
|
||||
|
||||
if (hash && /^#map/.test(hash)) {
|
||||
const [, newUrl] = hash.match(/^#map[:/?!](.*)$/);
|
||||
|
||||
|
@ -149,6 +144,11 @@ function* mapInitSaga() {
|
|||
function* authCheckSaga() {
|
||||
const { id, token } = yield select(getUser);
|
||||
|
||||
if (window.location.search) {
|
||||
const { viewer_id, access_token, auth_key } = yield parseQuery(window.location.search);
|
||||
if (viewer_id && access_token && auth_key) yield put(iframeLoginVk({ viewer_id, access_token, auth_key }));
|
||||
}
|
||||
|
||||
if (id && token) {
|
||||
const user = yield call(checkUserToken, { id, token });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue