Skip to content

Conversation

@lnqminh3003
Copy link
Collaborator

No description provided.

rxmox and others added 30 commits December 4, 2025 19:20
- Add JWT token to login response in auth_controller.ts
  * Import generateToken from jwt_utils
  * Generate token after successful login
  * Return token alongside userId in response

- Add protected /me endpoint in user_route.ts
  * Import and apply authMiddleware
  * Returns current user's profile (excluding password)
  * Demonstrates JWT authentication working

This completes the JWT authentication implementation.
Users now receive a token on login that can be used to
access protected routes.
- Make JWT_EXPIRATION configurable via environment variable (defaults to 30d)
- Add case-insensitive Bearer token check for RFC 7230 compliance
- Remove unnecessary async keyword from authMiddleware

These improvements enhance flexibility and follow best practices without breaking existing functionality.
Return JWT token from /signup endpoint to match /login behavior.
Users are now automatically authenticated after registration,
eliminating the need for a separate login call.
react-router-dom is a React frontend library and should not be
in the backend. This was likely added by mistake.
…pi-and-refactor-models

[Backend] - Big update for join event api and refactor models
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.

6 participants