fix: secure email change recovery flow

This commit is contained in:
237899745
2026-07-26 02:03:43 +08:00
parent de5f451cd1
commit 016ce9ebab
12 changed files with 999 additions and 105 deletions

View File

@@ -25,7 +25,11 @@ onMounted(async () => {
try {
const resp = await verifyEmail(token.value)
message.value = resp.message
auth.markEmailVerified()
if (resp.session_invalidated) {
auth.logout()
} else {
auth.markEmailVerified()
}
} catch (err) {
if (err instanceof ApiError) {
error.value = `[${err.code}] ${err.message}`