Skip to content

Marketing website#30

Open
MaksimMuzychenko wants to merge 26 commits intodevfrom
marketing-website
Open

Marketing website#30
MaksimMuzychenko wants to merge 26 commits intodevfrom
marketing-website

Conversation

@MaksimMuzychenko
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces significant refactoring and enhancement across the authentication and authorization modules of the marketing website API. Key changes include the addition of new MFA and token schemas and services, middleware improvements for authentication and request parsing, and adjustments in the household controller to enforce consistent type handling.

Reviewed Changes

Copilot reviewed 57 out of 59 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
api/src/services/auth/mfa.ts Adds MFA service functionality for key generation and verification.
api/src/schemas/obj-id.ts Updates object ID schemas to support union types and transformation.
api/src/schemas/auth/user.ts Refactors user and email schemas and error handling for user validation.
api/src/schemas/auth/tokens.ts Adds new token types and updates token payload schemas for MFA.
api/src/schemas/auth/auth.ts Introduces consolidated authentication schemas and middleware helpers.
api/src/routes/auth.ts Updates auth routes with new endpoints and middleware usage.
api/src/middleware/auth.ts Implements improved middleware for authentication and auto token refresh.
api/src/controllers/household.ts Adjusts user ID handling consistently by converting to string.
api/src/index.ts Registers new middleware and initializes database blacklists.
api/src/generate-jwe-encryption-key.ts Adds a script for generating a 256-bit key for JWE encryption.
api/src/configure-db.ts Introduces a DB configuration script for collections.
api/README.md Updates documentation to include MFA token expiry details.
Files not reviewed (2)
  • api/package-lock.json: Language not supported
  • api/package.json: Language not supported
Comments suppressed due to low confidence (1)

api/src/schemas/auth/auth.ts:34

  • [nitpick] There is a typo in 'bigIntTransormed'; consider renaming it to 'bigIntTransformed' for clarity.
const bigIntTransormed = z

/** The user's sex/gender */
export type Sex = z.infer<typeof sexSchema>;

/** THe user schema */
Copy link

Copilot AI Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the capitalization error: 'THe' should be 'The'.

Suggested change
/** THe user schema */
/** The user schema */

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants