S
SolidJS•7mo 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?
6 Replies
Prohar 🕉
Prohar 🕉•7mo ago
are u using authjs?
Nathan
Nathan•7mo ago
I'm using Lucia.
Prohar 🕉
Prohar 🕉•7mo ago
for some reason api routes are not working on my end too
Tommypop
Tommypop•7mo 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
Nathan•7mo ago
I'm just using an a tag to navigate.
Tommypop
Tommypop•7mo 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
Want results from more Discord servers?
Add your server