if logged_in?
if params[:remember_me] == '1'
self.current_user.remember_me
- cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at }
+ cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at, :http_only => true }
end
redirect_back_or_default(home_url)
else
def send_remember_cookie!
cookies[:auth_token] = {
:value => @current_user.remember_token,
- :expires => @current_user.remember_token_expires_at }
+ :expires => @current_user.remember_token_expires_at,
+ :http_only => true }
end
end