Getting 401 when attempting to signup or login in django allauth react-spa example
I am very new to using to Django-allauth, I'm wanting to integrate it with my Django backend. I was trying to use the react-spa example outlined in the docs https://react.demo.allauth.org/, but I 401 error when sending either a signup or login request. Why is this happening?
The response looks like:
{
"status": 401,
"data": {
"flows": [
{
"id": "login"
},
{
"id": "login_by_code"
},
{
"id": "signup"
},
{
"id": "provider_redirect",
"providers": [
"dummy"
]
},
{
"id": "provider_token",
"providers": [
"dummy"
]
},
{
"id": "mfa_login_webauthn"
},
{
"id": "verify_email",
"is_pending": true
}
]
},
"meta": {
"is_authenticated": false
}
}
I understand that the flows array indicates those are the methods to authenticate. But how can I authenticate if the login / signup method preventing me from doing so?
Steps to repro:
- I ran this example locally, cloned it here https://codeberg.org/allauth/django-allauth/src/branch/main/examples/react-spa
- Ran docker compose up
- Visit
localhost:10000
, when to signup - entered email and password + password confirmation. Request was successful and I was redirected to the enter email confirmation code screen - I didn't input the code in step 3. Instead, went back to signup page to enter my actual email to get the code and input it. Tried using that email and got a 401 response.
I was expecting to be able to successfully send the signup request, but this was not the case. Any help appreciated :)