Skip to content

Commit eb2cec1

Browse files
pyramationtheothersideofgods
authored andcommitted
feat: OAuth middleware with module loaders for identity/secrets/auth config
Replace manual SQL queries and hardcoded schema assumptions in OAuth middleware with module loaders from express-context: New loaders: - encryptedSecretsLoader: resolves encrypted_secrets schema from metaschema_modules_public.encrypted_secrets_module - userAuthLoader: resolves user_auth_module for sign_in/sign_up function names and schema (no longer assumes privateSchema) - identityProvidersLoader: resolves identity_providers_module for provider config table location OAuth middleware changes: - Uses req.constructive.useModule() for all schema lookups - Uses req.constructive.withPgClient() for properly scoped RLS transactions (replaces manual set_config calls) - Removes express-rate-limit (DB already handles rate limiting) - Uses getNodeEnv() instead of process.env.NODE_ENV - Extracts email_verified from raw provider profile data - Passes loaders registry to createContextMiddleware in server.ts Addresses review comments from PR #1141.
1 parent 0f9a0c4 commit eb2cec1

10 files changed

Lines changed: 944 additions & 185 deletions

File tree

graphql/server/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@constructive-io/express-context": "workspace:^",
4747
"@constructive-io/graphql-env": "workspace:^",
4848
"@constructive-io/graphql-types": "workspace:^",
49+
"@constructive-io/oauth": "workspace:^",
4950
"@constructive-io/s3-utils": "workspace:^",
5051
"@constructive-io/upload-names": "workspace:^",
5152
"@constructive-io/url-domains": "workspace:^",

0 commit comments

Comments
 (0)