redirect after useFetch redirect response
When I use
useFetch
on a page to (for example) log in, I return a sendRedirect
from the api route like so:
This redirect, however, does not redirect the app but returns the redirected page as the data in:
Are redirects supported by the useFetch
function? Or do I need to catch the 302
http response and redirect manually?
(Same goes for $fetch. I might not quite understand how the function works)2 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
if you want to redirect your page, get the fetch response and THEN make the redirection within your page component