https://supertokens.com/ logo
#general
Title
# general
n

Noraiz

05/06/2022, 1:10 PM
Getting 404 with supertoken auth apis in NESTJS
r

rp

05/06/2022, 1:12 PM
Can you enable debug logs and send the request?
and then show the output
n

Noraiz

05/06/2022, 1:13 PM
i've enabled logs but i am not getting any error in the backend
r

rp

05/06/2022, 1:14 PM
which version of the supertokens-node SDK? How have you enabled logs?
n

Noraiz

05/06/2022, 1:14 PM
"supertokens-node": "^9.2.0"
r

rp

05/06/2022, 1:15 PM
ok. that version is fine
n

Noraiz

05/06/2022, 1:15 PM
i've followed this guide
r

rp

05/06/2022, 1:15 PM
How have you enabled debug logs?
Did you see the troubleshooting section?
n

Noraiz

05/06/2022, 1:15 PM
"start:dev": "DEBUG=com.supertokens && nest start --watch",
r

rp

05/06/2022, 1:16 PM
Chanhe it to
DEBUG=com.supertokens nest start --watch
n

Noraiz

05/06/2022, 1:16 PM
nop
r

rp

05/06/2022, 1:16 PM
remove the &&
n

Noraiz

05/06/2022, 1:17 PM
alright
now this is what i am getting
perhaps some issue with the middleware
this is the api
r

rp

05/06/2022, 1:19 PM
what are the logs when you start the server?
n

Noraiz

05/06/2022, 1:19 PM
returning 404
r

rp

05/06/2022, 1:20 PM
what is the value of apiBasePath that you have set on the backend?
So you need to set the apiBasePath on the frontend to "/" as well. Also, you should remove the "/auth" from your query URLs cause your apiBasePath is just "/" (which is what you have set)
n

Noraiz

05/06/2022, 1:22 PM
initially it was /api/v1 but my front-end sdk was not prefixing that so i removed from front-end and back-end as well
let me check that agian
2 Views