Skip to content

Develop#64

Merged
Jacquilyn-F merged 3 commits intomainfrom
develop
May 1, 2025
Merged

Develop#64
Jacquilyn-F merged 3 commits intomainfrom
develop

Conversation

@OutsideofemiT
Copy link
Collaborator

No description provided.

Copy link

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 enhances the server and client configurations by adding JWT-based authentication in the Apollo Server setup, updating static file serving logic, and revising the client’s build and Apollo Client configuration.

  • Implements JWT verification for API requests through a new getContext function.
  • Updates static file serving to check for client dist files using fs.
  • Adjusts the Vite build output and simplifies the Apollo Client setup to use cookie-based authentication.

Reviewed Changes

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

File Description
server/src/server.ts Adds JWT authentication context and updates static file serving logic
client/vite.config.ts Configures the build output directory
client/src/Utils/apolloClient.ts Adjusts Apollo Client configuration to rely on cookies and removes token auth
Comments suppressed due to low confidence (1)

client/src/Utils/apolloClient.ts:8

  • [nitpick] The previous token-based authentication logic (using an auth link) was removed in favor of sending cookies only; ensure that the backend authentication strategy supports this change and update documentation if necessary.
credentials: 'include', // 🔐 Send cookies with each request

Comment on lines 76 to +77
startApolloServer();
//commits// No newline at end of file
Copy link

Copilot AI May 1, 2025

Choose a reason for hiding this comment

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

The trailing comment '//commits//' appears extraneous; consider removing it to clean up the production code.

Suggested change
startApolloServer();
//commits//
startApolloServer();

Copilot uses AI. Check for mistakes.
@Jacquilyn-F Jacquilyn-F merged commit 68dd25a into main May 1, 2025
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