pl-fe: is this a race condition?

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2025-03-16 09:18:27 +01:00
parent 34ef1950cc
commit a67cbfae94
2 changed files with 6 additions and 2 deletions

View File

@ -44,7 +44,9 @@ const prepareRequest = (provider: string) =>
const query = queryString.stringify(params);
location.href = `${baseURL}/oauth/prepare_request?${query.toString()}`;
setTimeout(() => {
location.href = `${baseURL}/oauth/prepare_request?${query.toString()}`;
}, 100);
};
export {

View File

@ -59,7 +59,9 @@ const externalAuthorize = (instance: Instance, baseURL: string) => {
localStorage.setItem('plfe:external:baseurl', baseURL);
localStorage.setItem('plfe:external:scopes', scopes);
window.location.href = `${baseURL}/oauth/authorize?${query.toString()}`;
setTimeout(() => {
window.location.href = `${baseURL}/oauth/authorize?${query.toString()}`;
}, 100);
});
};