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(() => {
const code = new URLSearchParams(window.location.search).get('code');
if (code) {
authenticate(code);
return;
const url = new URL(window.location.href);
const isCallback = url.pathname.endsWith('/callback');
const code = url.searchParams.get('code');
if (isCallback && code) {
window.history.replaceState({}, document.title, url.pathname);
}
if (isAuthenticated.value) {
checkAccess();
checkVersion();