feat: create managed profiles atomically

- Require a fresh cookie MFA proof before creation\n- Create the credential-less profile and initial Guardian grant together
This commit is contained in:
Marc-André Bombeck committed 2026-08-06 02:28:56 +02:00
1 parent 51cbbae17f
commit 58434a2b44
5 files changed
+171 -11

No files matched your search

@@ -131,7 +131,7 @@ describe("managed profile lifecycle (real Postgres)", () => {
expect(profile.dateOfBirth).toBeNull();
});
it("rolls the profile back when creating its Guardian grant fails", async () => {
it("creation rolls the profile back when its Guardian grant fails", async () => {
await signInWithFreshMfa();
const prisma = getPrismaClient();
await prisma.$executeRawUnsafe(