https://supertokens.com/ logo
f

Fernando

02/24/2022, 10:10 AM
Hello, I have a problem with the authentication of my API. I have the front in nextJs and the back in FastAPI. API calls from the front return always a 401. The AxiosInterceptors doesn't work either. Thanks 🙂
r

rp

02/24/2022, 10:11 AM
Can I see the frontend and backend supertokens config?
f

Fernando

02/24/2022, 10:15 AM
sorry, send in other
r

rp

02/24/2022, 10:17 AM
Can I see the URL and request header for the first axios call (without credentials being added)? And what is the value of NEXT_PUBLIC_WEBSITE_DOMAIN while you are testing this?
f

Fernando

02/24/2022, 10:18 AM
yes, i go
NEXT_PUBLIC_WEBSITE_DOMAIN in local is http://localhost:3000
r

rp

02/24/2022, 10:21 AM
ah i see. But your axios is quering localhost:8000, So you should change the apiDomain to "http://localhost:8000"
on the frontend config and backend config
definite
Thanks a lot
r

rp

02/24/2022, 10:25 AM
Did it work?
f

Fernando

02/24/2022, 10:25 AM
yes
r

rp

02/24/2022, 10:25 AM
awesome!
4 Views