jeremyevans / rodauth

Ruby's Most Advanced Authentication Framework
http://rodauth.jeremyevans.net
MIT License
1.69k stars 95 forks source link

Update paths.rdoc guide to include use of `require_login_redirect` #223

Closed jaryl closed 2 years ago

jaryl commented 2 years ago

When changing login_route as prescribed in the guide, developers of non API only apps will likely want to also update require_login_redirect. I was looking into whether this was a rodauth-rails specific issue, but I am not familiar enough to tell, and will leave this as draft.

janko commented 2 years ago

I was thinking it would be convenient if the login feature would override require_login_redirect with login_path, so that it updates automatically.

jaryl commented 2 years ago

I was thinking it would be convenient if the login feature would override require_login_redirect with login_path, so that it updates automatically.

@janko require_login_redirect is used in at least 8 other features (going by a GH search), so I'd be wary of unintended consequences. I'm fine with having to change this manually (having control is good), but I had to hunt around the docs/code to figure it out.

jeremyevans commented 2 years ago

I think this is a good change to make. I'm also wary of changing the default for require_login_redirect, at least until Rodauth 3.0. I'll merge this shortly.