Add auth in all controllers
This commit is contained in:
@@ -3,9 +3,11 @@ class SessionsController < ApplicationController
|
||||
rate_limit to: 10, within: 3.minutes, only: :create, with: -> { redirect_to new_session_url, alert: "Try again later." }
|
||||
|
||||
def new
|
||||
skip_authorization
|
||||
end
|
||||
|
||||
def create
|
||||
skip_authorization
|
||||
if user = User.authenticate_by(params.permit(:email_address, :password))
|
||||
start_new_session_for user
|
||||
redirect_to after_authentication_url
|
||||
|
||||
Reference in New Issue
Block a user