fix(api): needsSetup guard ordering in setup auth endpoints (GRO-392 UAT fix) #215

Merged
groombook-engineer[bot] merged 13 commits from feat/gro-392-oobe-auth-provider-bootstrap into main 2026-04-03 07:17:13 +00:00
Showing only changes of commit 032ce584df - Show all commits
+2 -2
View File
@@ -149,7 +149,7 @@ setupRouter.post("/auth-provider", async (c) => {
return c.json({ error: "Auth provider is already configured." }, 409);
}
const body = authProviderBootstrapSchema.parse(c.req.valid("json"));
const body = authProviderBootstrapSchema.parse(await c.req.json());
// Encrypt clientSecret before storing
const encryptedSecret = encryptSecret(body.clientSecret);
@@ -206,7 +206,7 @@ setupRouter.post("/auth-provider/test", async (c) => {
return c.json({ ok: false, error: "Setup has already been completed." }, 403);
}
const body = authProviderTestSchema.parse(c.req.valid("json"));
const body = authProviderTestSchema.parse(await c.req.json());
// Determine the discovery URL
const discoveryUrl = body.internalBaseUrl