Replies: 2 comments 2 replies
-
Hi @rbracco 👋 It looks like a CORS issue. Allow Origins are very picky, so |
Beta Was this translation helpful? Give feedback.
-
Hey, sorry I should have sent the request headers in my initial post (now included below). I am operating from http://localhost:3000 and that is appearing as the Origin in the request header. I added http://127.0.0.1:3000 to my allow_origins just to be safe but I still receive the same 401 cors response. Any ideas of what I could be doing wrong? Also no worries if this is outside the scope of fastapi_users discussions, just let me know and I will try to debug elsewhere. Thank you! GET /users/me HTTP/1.1 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! I'm trying to add an auth router that uses cookie based transport. I was able to setup the new auth backend, and when I login it returns a null 200 response that contains a set-cookie header, but then when I make a fetch request to /users/me I get a 401 unauthorized and I can't see the cookie being sent in the network request. Here's exactly what I'm doing, please let me know if there's any more info I can provide.
Fastapi-users version 9.3
FastAPI Side
Frontend
Response
{headers: Headers {}
ok: false
redirected: false
status: 401
statusText: "Unauthorized"
type: "cors"
url: "http://127.0.0.1:8000/users/me"
}
Beta Was this translation helpful? Give feedback.
All reactions