88 }: {}"
99 >
1010
11- <img v-if =" coreStore.config?.loginBackgroundImage && backgroundPosition !== 'over'"
11+ <img v-if =" !oauthRedirecting && coreStore.config?.loginBackgroundImage && backgroundPosition !== 'over'"
1212 :src =" loadFile(coreStore.config?.loginBackgroundImage)"
1313 class =" position-absolute top-0 left-0 h-screen object-cover w-0"
1414 :class =" {
2121 }[backgroundPosition]"
2222 />
2323
24+ <div v-if =" oauthRedirecting" >
25+ <Spinner class="w-10 h-10" />
26+ </div >
27+
2428 <!-- Main modal -->
2529 <div id =" authentication-modal" tabindex =" -1"
30+ v-show =" !oauthRedirecting"
2631 class =" af-login-modal overflow-y-auto flex flex-grow
2732 overflow-x-hidden z-50 min-w-[350px] justify-center items-center md:inset-0 h-[calc(100%-1rem)] max-h-full" >
2833 <div class =" relative p-4 w-full max-h-full max-w-[400px]" >
112117 :is =" getCustomComponent(formatComponent(c))"
113118 :meta =" formatComponent(c).meta"
114119 @update:disableLoginButton =" setDisableLoginButton($event)"
120+ @update:oauthRedirecting =" oauthRedirecting = $event"
115121 />
116122 </form >
117123 </div >
@@ -132,8 +138,8 @@ import { useCoreStore } from '@/stores/core';
132138import { useUserStore } from ' @/stores/user' ;
133139import { IconEyeSolid , IconEyeSlashSolid } from ' @iconify-prerendered/vue-flowbite' ;
134140import { callAdminForthApi , loadFile } from ' @/utils' ;
135- import { useRouter } from ' vue-router' ;
136- import { Button , Checkbox , Input } from ' @/afcl' ;
141+ import { useRouter , useRoute } from ' vue-router' ;
142+ import { Button , Checkbox , Input , Spinner } from ' @/afcl' ;
137143import ErrorMessage from ' @/components/ErrorMessage.vue' ;
138144
139145const passwordInput = ref <InstanceType <typeof Input > | null >(null );
@@ -143,6 +149,8 @@ const username = ref('');
143149const password = ref (' ' );
144150
145151const router = useRouter ();
152+ const route = useRoute ();
153+ const oauthRedirecting = ref <boolean >(' start_oauth' in route .query && route .query .start_oauth !== ' ' );
146154const inProgress = ref <boolean >(false );
147155const isSuccess = ref <boolean >(false );
148156const coreStore = useCoreStore ();
0 commit comments