Skip to content

Fix loginAccessToken Prop in useAuth.ts to Resolve 400 Error on dashboard login #1688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gregorvolkmann
Copy link

This pull request fixes an HTTP 400 error in production by updating the login function in frontend/src/hooks/useAuth.ts. The LoginService.loginAccessToken call was incorrectly passing { formData: data } instead of { formData: { data.username, data.password } }, causing a type mismatch and sending multipart/form-data instead of application/x-www-form-urlencoded. The change ensures compliance with the LoginLoginAccessTokenData type and corrects the login request format.

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.

1 participant