Skip to content

Conversation

@Paulijuz
Copy link
Member

@Paulijuz Paulijuz commented Jan 21, 2026

This is not very elegant nor type safe. However, it resolves the JWT error spamming in the console. JWT size has been reduced by around 75%.

I also changed the page title to 'Sanctus Omega Brodserskab' finally and removed errors on invalid JWT token (no more spam about that during dev).

Copy link
Contributor

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 pull request addresses JWT token size issues by implementing compression for JWT payload fields, reducing token size by approximately 75%. It also updates the page title to 'Sanctus Omega Broderskab' and improves development experience by reducing JWT error spam during development.

Changes:

  • Added JWT compression/decompression using zlib to reduce token size for permissions, memberships, and user fields
  • Updated authentication logger to treat JWT session errors as warnings instead of errors during development
  • Changed application metadata with proper title, description, and keywords

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/auth/nextAuth/jwtCompression.ts New utility module implementing compression and decompression of JWT fields using zlib
src/auth/nextAuth/authOptions.ts Integrated JWT compression into encode/decode flow and added custom logger to reduce development noise
src/app/layout.tsx Updated page metadata with proper title, description, and keywords for the organization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants