fix(vikon): skip authenticate call on OAuth callback, tokens already saved server-side
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user