You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fells-code/seamless-auth-types#4 consolidates the contracts this repo shares with the SDKs, the dashboard, and the CLI. Once that release is published, most of src/schemas/ becomes a re-export.
Schemas that now exist in @seamless-auth/types and can be deleted here:
src/lib/scopedRoles.ts and src/schemas/roles.schema.ts (the server maintained its own copy of the same logic, see fells-code/seamless-auth-server)
src/schemas/systemConfig.schema.ts and src/schemas/systemConfig.patch.schema.ts
src/schemas/authEvent.types.ts
src/schemas/user.schema.ts (ApiUserSchema)
src/schemas/organization.requests.ts and src/schemas/organization.responses.ts
src/schemas/oauth.{requests,responses}.ts and src/schemas/oauthProviders.{requests,responses}.ts
src/schemas/webauthn.{requests,responses}.ts
src/schemas/totp.{requests,responses}.ts and src/schemas/stepUp.responses.ts
src/schemas/me.response.ts
src/schemas/internalMetrics.responses.ts and the metrics half of src/schemas/internal.query.ts
src/schemas/admin.{query,requests,responses}.ts
src/schemas/auth.{requests,responses}.ts, registration.*, otp.*, magiclink.*, session.*, credential.responses.ts, and the envelopes in generic.responses.ts
Two things that stay local because they depend on this repo's runtime:
The PRF salt validation in webauthn.requests.ts. The shared schema asserts the wire shape only, so assertValidPrfSalt still needs to run here, either as a .superRefine on top of the shared schema or in the handler.
OrganizationSchema timestamps are parsed as ISO dates rather than z.any(), so createdAt and updatedAt become strings on the way out.
AUTH_EVENT_TYPES gained magic_link_failed relative to the dashboard's copy and dropped the bootstrap_admin_* entries.
One note for OAuthProviderUpdateSchema: fields that carry a default still resolve to that default when the caller omits them, so updateOAuthProvider must keep merging req.body rather than the parsed output. That is what it does today, so nothing to change, but it is easy to break in a refactor.
fells-code/seamless-auth-types#4 consolidates the contracts this repo shares with the SDKs, the dashboard, and the CLI. Once that release is published, most of
src/schemas/becomes a re-export.Schemas that now exist in
@seamless-auth/typesand can be deleted here:src/lib/scopedRoles.tsandsrc/schemas/roles.schema.ts(the server maintained its own copy of the same logic, see fells-code/seamless-auth-server)src/schemas/systemConfig.schema.tsandsrc/schemas/systemConfig.patch.schema.tssrc/schemas/authEvent.types.tssrc/schemas/user.schema.ts(ApiUserSchema)src/schemas/organization.requests.tsandsrc/schemas/organization.responses.tssrc/schemas/oauth.{requests,responses}.tsandsrc/schemas/oauthProviders.{requests,responses}.tssrc/schemas/webauthn.{requests,responses}.tssrc/schemas/totp.{requests,responses}.tsandsrc/schemas/stepUp.responses.tssrc/schemas/me.response.tssrc/schemas/internalMetrics.responses.tsand the metrics half ofsrc/schemas/internal.query.tssrc/schemas/admin.{query,requests,responses}.tssrc/schemas/auth.{requests,responses}.ts,registration.*,otp.*,magiclink.*,session.*,credential.responses.ts, and the envelopes ingeneric.responses.tsTwo things that stay local because they depend on this repo's runtime:
webauthn.requests.ts. The shared schema asserts the wire shape only, soassertValidPrfSaltstill needs to run here, either as a.superRefineon top of the shared schema or in the handler.jwks.responses.ts, which no other repo consumes.Behavior differences to expect when adopting:
TransportSchemais wider, see Passkey transports outside usb/ble/nfc/internal may be rejected #123.OrganizationSchematimestamps are parsed as ISO dates rather thanz.any(), socreatedAtandupdatedAtbecome strings on the way out.AUTH_EVENT_TYPESgainedmagic_link_failedrelative to the dashboard's copy and dropped thebootstrap_admin_*entries.One note for
OAuthProviderUpdateSchema: fields that carry a default still resolve to that default when the caller omits them, soupdateOAuthProvidermust keep mergingreq.bodyrather than the parsed output. That is what it does today, so nothing to change, but it is easy to break in a refactor.