S
SolidJS•9mo ago
Nathan

Solid-Start preloads 404 page instead of OAuth API route

I'm trying to set up OAuth in a Solid-Start project. I have a API route for a GET request to redirect to the 3rd-party server which works when accessed directly. However, when I try to make a link to that route, the app preloads the 404 page, instead. How can I get it to navigate to the correct route?
7 Replies
Prohar 🕉
Prohar 🕉•9mo ago
are u using authjs?
Nathan
NathanOP•9mo ago
I'm using Lucia.
Prohar 🕉
Prohar 🕉•9mo ago
for some reason api routes are not working on my end too
Tommypop
Tommypop•9mo ago
I would guess this is an issue with start's router and CSR, maybe try using window.location.replace or something similar rather than useNavigate if that's what you're currently using
Nathan
NathanOP•9mo ago
I'm just using an a tag to navigate.
Tommypop
Tommypop•9mo ago
Maybe try using something different? Start will use CSR with regular a tags and the client-side router might not know about your API route
Lorre
Lorre•7d ago
did you ever solve this? having the same issue window.location.replace works! thank you
Want results from more Discord servers?
Add your server