Accounts 1.0.0 backend: OIDC provider, sign-in steps, account and admin API
oidc-provider 9.13.3 with PKCE, ES256, crosscode.identity/1 claims and back-channel logout; clients are the linked products (Connect). Sign-in steps (password, sign-up, email check, 2FA and its setup, privacy notice, news question, password reset) survive to the product. Account page and admin API, church profile, export and deletion fan-out, Hub v2 client, jobs. End-to-end tests with a test product on openid-client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,8 @@ export const serviceTimeSchema = z.object({
|
||||
note: z.string().trim().max(300).nullable(),
|
||||
});
|
||||
|
||||
export const churchSchema = z
|
||||
/** The profile's fields without the cross-field checks, for building forms that edit part of it (contracts 1.5.0). */
|
||||
export const churchObjectSchema = z
|
||||
.object({
|
||||
schema: z.literal(CHURCH_SCHEMA),
|
||||
/** The Hub customer id: the same for every product of the church. */
|
||||
@@ -85,8 +86,9 @@ export const churchSchema = z
|
||||
app: urlSchema.nullable(),
|
||||
accounts: urlSchema,
|
||||
}),
|
||||
})
|
||||
.superRefine((church, ctx) => {
|
||||
});
|
||||
|
||||
export const churchSchema = churchObjectSchema.superRefine((church, ctx) => {
|
||||
const slugs = new Set(church.campuses.map((c) => c.slug));
|
||||
if (slugs.size !== church.campuses.length) ctx.addIssue({ code: "custom", path: ["campuses"], message: "Campus slugs must be unique" });
|
||||
church.serviceTimes.forEach((s, i) => {
|
||||
|
||||
Reference in New Issue
Block a user