fix: 🐛 Fix failed auth after email update #691
Tim Izzo tim@5ika.ch
Thu, 09 Oct 2025 16:41:50 +0200
2 files changed,
6 insertions(+),
2 deletions(-)
M
backend/src/graphql/user/index.ts
→
backend/src/graphql/user/index.ts
@@ -67,6 +67,10 @@ if (!validPassword) throw new Error("Wrong password");
delete userUpdate.oldPassword; } + const isStrapiUser = user.provider === "local"; + if (userUpdate.email && isStrapiUser) + userUpdate.username = userUpdate.email; + const currentEvents = user.events || []; const currentEventIds = currentEvents.map((event) => `${event.id}`); const userUpdateEvents = userUpdate.events?.filter(
M
yarn.lock
→
yarn.lock
@@ -24046,11 +24046,11 @@ linkType: hard
"typescript@patch:typescript@npm%3A^5.9.2#optional!builtin<compat/typescript>": version: 5.9.2 - resolution: "typescript@patch:typescript@npm%3A5.9.2#optional!builtin<compat/typescript>::version=5.9.2&hash=8c6c40" + resolution: "typescript@patch:typescript@npm%3A5.9.2#optional!builtin<compat/typescript>::version=5.9.2&hash=5786d5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/66fc07779427a7c3fa97da0cf2e62595eaff2cea4594d45497d294bfa7cb514d164f0b6ce7a5121652cf44c0822af74e29ee579c771c405e002d1f23cf06bfde + checksum: 10c0/34d2a8e23eb8e0d1875072064d5e1d9c102e0bdce56a10a25c0b917b8aa9001a9cf5c225df12497e99da107dc379360bc138163c66b55b95f5b105b50578067e languageName: node linkType: hard