redirects.rdoc

doc/guides/redirects.rdoc
Last Update: 2020-06-30 15:06:09 -0700

Change redirect destination

You can change the redirect destination for any Rodauth action by overriding the corresponding *_redirect method:

plugin :rodauth do
  enable :login, :logout, :create_account, :reset_password

  # Redirect to "/dashboard" after login
  login_redirect "/dashboard"

  # Redirect to wherever login redirects to after creating account
  create_account_redirect { login_redirect }

  # Redirect to login page after password reset
  reset_password_redirect { login_path }
end