From c57d0be562775ec42bd89860669b8d71c992dc85 Mon Sep 17 00:00:00 2001 From: Marco Crapts Date: Wed, 31 May 2023 21:14:59 +0200 Subject: [PATCH] redirect signin --- src/components/Auth.vue | 3 ++- src/components/TopBar.vue | 15 ++++++++++----- src/components/TopBar/Settings/SignOut.vue | 2 +- src/components/ui/UIModal.vue | 8 ++++---- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/components/Auth.vue b/src/components/Auth.vue index 8d51a9d..fc0f6da 100644 --- a/src/components/Auth.vue +++ b/src/components/Auth.vue @@ -18,7 +18,8 @@ const uiConfig = { firebase.auth.EmailAuthProvider.PROVIDER_ID, firebase.auth.GoogleAuthProvider.PROVIDER_ID ], - signInFlow: 'popup', + // signInFlow: 'popup', + signInFlow: 'redirect', callbacks: { signInSuccessWithAuthResult(authResult: any) { // var user = authResult.user diff --git a/src/components/TopBar.vue b/src/components/TopBar.vue index 00d1be9..afd6b39 100644 --- a/src/components/TopBar.vue +++ b/src/components/TopBar.vue @@ -16,7 +16,12 @@ const emit = defineEmits<{ const searchActive = ref(false) const authUI: any = inject('firebaseAuthUI') -const authModalInitialStateOpen = ref(authUI.isPendingRedirect()) +const authPending = ref(authUI.isPendingRedirect()) + +const handleSignIn = async (close: () => Promise) => { + await close() + authPending.value = false +}