diff --git a/packages/uikit/src/components/FAuthMethodModal/FAuthMixinMessenger.tsx b/packages/uikit/src/components/FAuthMethodModal/FAuthMixinMessenger.tsx index d4cf664..310c29e 100644 --- a/packages/uikit/src/components/FAuthMethodModal/FAuthMixinMessenger.tsx +++ b/packages/uikit/src/components/FAuthMethodModal/FAuthMixinMessenger.tsx @@ -1,4 +1,4 @@ -import { defineComponent, onMounted, ref, PropType } from "vue"; +import { defineComponent, onMounted, ref, PropType, onUnmounted } from "vue"; import { useDisplay, useLocale } from "vuetify"; import authorize from "../../utils/authorize"; @@ -67,9 +67,15 @@ export const FAuthMixinMessenger = defineComponent({ }; const handleOpenInApp = () => { - window.location.href = qrUrl.value; + if (qrUrl.value) { + window.location.href = qrUrl.value; + } }; + onUnmounted(() => { + client.value?.disconnect(); + }); + onMounted(() => { client.value = authorize( {