I'm building an ecommerce app and when the user try to go to payment page I need to ensure the user is authenticated, i do it by using the 'auth' middleware in 'payment' page and, if not authenticated, the user is redirected to login. Everything works perfectly, bu I have to redirect the user back to payment page after the login.
Is there any way to change /home in runtime?
I'm building an ecommerce app and when the user try to go to payment page I need to ensure the user is authenticated, i do it by using the 'auth' middleware in 'payment' page and, if not authenticated, the user is redirected to login. Everything works perfectly, bu I have to redirect the user back to payment page after the login.
Is there a way to set an "intended" url?