[Auth] Warn insecure context on login (#3663)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-04-27 22:04:19 -04:00
committed by GitHub
parent 96d954ceb2
commit b1a98437e4
9 changed files with 13 additions and 8 deletions

View File

@@ -17,6 +17,10 @@
</p>
</div>
<Message v-if="!isSecureContext" severity="warn" class="mb-4">
{{ t('auth.login.insecureContextWarning') }}
</Message>
<!-- Form -->
<SignInForm v-if="isSignIn" @submit="signInWithEmail" />
<template v-else>
@@ -106,6 +110,7 @@ const { onSuccess } = defineProps<{
const { t } = useI18n()
const authService = useFirebaseAuthService()
const isSecureContext = window.isSecureContext
const isSignIn = ref(true)
const toggleState = () => {
isSignIn.value = !isSignIn.value