Replies: 2 comments 1 reply
-
Yeas @semyou that's the approach. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@rafinskipg but that is super inefficient. Why not redirect straight from the API ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Imagine the case when a user submits their login form. I want to be able to redirect on the api route on the server to a logged-in page. How do I achieve this?
Right now, browser sends a fetch with post to the api router /login. The API returns a res with status 200. I check if response.ok? then I do a router.push('/logged-in')
Beta Was this translation helpful? Give feedback.
All reactions