diff --git a/web/app/pages/settings/index.vue b/web/app/pages/settings/index.vue index 8861ec12..988f0497 100644 --- a/web/app/pages/settings/index.vue +++ b/web/app/pages/settings/index.vue @@ -15,7 +15,12 @@ import { mdiCalendarClock, mdiPlus, } from '@mdi/js' -import { getAuth, signOut, type User as FirebaseUser } from 'firebase/auth' +import { + getAuth, + sendEmailVerification, + signOut, + type User as FirebaseUser, +} from 'firebase/auth' import QRCode from 'qrcode' import { ErrorMessages } from '~/utils/errors' import { toApiError } from '~/utils/api-error' @@ -45,6 +50,29 @@ const notificationsStore = useNotificationsStore() const firebaseUser = ref(null) const gravatarUrl = ref(null) +const sendingVerificationEmail = ref(false) +const verificationEmailSent = ref(false) + +async function sendVerificationEmail() { + if (!firebaseUser.value) return + sendingVerificationEmail.value = true + try { + await sendEmailVerification(firebaseUser.value) + verificationEmailSent.value = true + notificationsStore.addNotification({ + message: 'Verification email sent. Please check your inbox.', + type: 'success', + }) + } catch (error) { + console.error('sendEmailVerification failed:', error) + notificationsStore.addNotification({ + message: 'Failed to send verification email. Please try again later.', + type: 'error', + }) + } finally { + sendingVerificationEmail.value = false + } +} const computeGravatarUrl = async (email: string): Promise => { const normalized = email.trim().toLowerCase() @@ -819,6 +847,17 @@ onMounted(async () => { color="primary" :icon="mdiShieldCheck" /> + + Verify Email + { -
API Key
+
API Key

Use your API Key in the x-api-key HTTP Header when sending requests to