Skip to content

Conversation

@daoistbro
Copy link

The requestLimiter middleware runs BEFORE requireAuth, so req.token is not set yet. This causes POST endpoints to fail with 'Authentication required' because the rate limiter extracts an undefined token, affecting the request flow.

Fix: Directly extract token from Authorization header in getKey() function.

Fixes #60

The requestLimiter middleware runs BEFORE requireAuth, so req.token is not set yet.
This causes POST endpoints to fail with 'Authentication required' because the
rate limiter extracts an undefined token, affecting the request flow.

Fix: Directly extract token from Authorization header in getKey() function.

Fixes moltbook#60
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.

🐛 Bug: POST endpoints (upvote/comment) return Authentication required despite valid token

1 participant