Sha256: 5594630d2048e7eb40deee84dcf15ab7087fb60857cb7a0710212c6446ec3282
Contents?: true
Size: 559 Bytes
Versions: 4
Compression:
Stored size: 559 Bytes
Contents
class Auth::AuthenticatedSessionController < ApplicationController skip_authentication only: %i[new create] def new render inertia: "Auth/Login", props: { canResetPassword: true, status: flash[:status] } end def create form = Auth::LoginForm.new params.permit(:email, :password) user = form.authenticate return redirect_back_or_to login_path, inertia: { errors: form.error_messages } if user.nil? login user redirect_to dashboard_path end def destroy logout redirect_to login_path end end
Version data entries
4 entries across 4 versions & 1 rubygems