fix: update email display in UI after email change
CI / ci (push) Successful in 1m11s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s

The OIDC session token retains the old email after a Logto email
change. Now the server returns the new email in the response and
the frontend optimistically updates the auth cache.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
makiolajandClaude Opus 4.6 committed 2026-04-12 23:31:24 +02:00
1 parent 6108db3dab
commit ef531f79b2
2 files changed
+8 -4

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ app.post("/email", zValidator("json", changeEmailSchema), async (c) => {
const logtoSub = await getLogtoSub(db, userId);
await logtoClient.updateEmail(logtoSub, newEmail);
return c.json({ ok: true });
return c.json({ ok: true, email: newEmail });
});
// ── Has Password ────────────────────────────────────────────────────