Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] Invalid parameters #47

Open
FranciscoDadone opened this issue Nov 11, 2022 · 1 comment
Open

[BUG] Invalid parameters #47

FranciscoDadone opened this issue Nov 11, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@FranciscoDadone
Copy link
Contributor

Describe the bug
Getting invalid parameters when trying to login using 2FA.

To Reproduce
curl -X 'GET'
'http://localhost:8000/auth/#'
-H 'accept: application/json'
-H 'Content-Type: application/x-www-form-urlencoded'
-d 'username=&password=&verification_code=<2FA CODE>'

Traceback
{
"detail": "Invalid Parameters",
"exc_type": "UnknownError"
}

Expected behavior
Get sessionid.

Additional context
Using docker container.

@FranciscoDadone FranciscoDadone added the bug Something isn't working label Nov 11, 2022
@slouchd
Copy link

slouchd commented Jan 23, 2023

You need to make a POST not a GET. Also, only use the verification_code parameter if you require it.

Example:
curl -X 'POST'
'http://localhost:8000/auth/#'
-H 'accept: application/json'
-H 'Content-Type: application/x-www-form-urlencoded'
-d 'username=USERNAME_HERE&password=PASSWORD_HERE

Also take a look at the OpenAPI docs: http://0.0.0.0:8000/docs when the container is running.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants