Skip to content

Conversation

@Leon-JavaScript
Copy link
Member

This PR refactors the JWT secret management in auth.ts to enhance security and maintain consistent usage. The changes include:

  • Using a single JWT_SECRET variable, with a default if not set.
  • Adding a warning if the secret is missing or set to the insecure default value.
  • Removing the redundant ACTUAL_JWT_SECRET variable.
  • Updating token generation and verification to use the unified JWT_SECRET.
  • Improving clarity of security warnings for development and production environments.

These updates help prevent accidental usage of insecure secrets and streamline authentication logic.

@Leon-JavaScript Leon-JavaScript added this to the v1.0.2 milestone Jan 10, 2026
@Leon-JavaScript Leon-JavaScript self-assigned this Jan 10, 2026
@Leon-JavaScript Leon-JavaScript merged commit a733d20 into master Jan 10, 2026
2 checks passed
@Leon-JavaScript Leon-JavaScript deleted the fix/jwt-secret-validation branch January 10, 2026 19:22
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