fix(vikon): skip authenticate call on OAuth callback, tokens already saved server-side

This commit is contained in:
F4ilji
2026-07-04 18:22:51 +05:00
parent 90d7cbc270
commit 7b9cf25631
@@ -146,11 +146,14 @@ const authUrl = computed(() => {
}); });
onMounted(() => { onMounted(() => {
const code = new URLSearchParams(window.location.search).get('code'); const url = new URL(window.location.href);
if (code) { const isCallback = url.pathname.endsWith('/callback');
authenticate(code); const code = url.searchParams.get('code');
return;
if (isCallback && code) {
window.history.replaceState({}, document.title, url.pathname);
} }
if (isAuthenticated.value) { if (isAuthenticated.value) {
checkAccess(); checkAccess();
checkVersion(); checkVersion();