You might be looking to redirect a customer to another URL rather than either the shop homepage or the customer account page. In order to do this, you can set the
afterAuthUrl() function works for post-login functions.
However, the easiest way to do this, can be to set a hidden input field “success_url” within your form. The trick for this however, is that the value for this field must be absolute. You cannot pass this field as simply
/cart/checkout, it should be
<input type="hidden" name="success_url" value="http://www.khactung.com/cart/checkout/" />
Thanks for watching!