lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt in authentication-zero-2.8.3 vs lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt in authentication-zero-2.8.4
- old
+ new
@@ -3,10 +3,10 @@
end
def create
session = Current.session
-<% if options.omniauth? -%>
+<% if omniauthable? -%>
if session.<%= singular_table_name %>.authenticate(params[:password]) || session.<%= singular_table_name %>.provider
<% else -%>
if session.<%= singular_table_name %>.authenticate(params[:password])
<% end -%>
session.update!(sudo_at: Time.current); redirect_to(params[:proceed_to_url])