Class: PasskeyAuth::Webauthn::AuthenticationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/passkey_auth/webauthn/authentications_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/controllers/passkey_auth/webauthn/authentications_controller.rb', line 16

def create
  result = authenticate_webauthn

  if result[:success]
    session.delete(:webauthn_authentication_user_id)

    respond_to do |format|
      format.json { render json: result }
      format.html { redirect_to result[:redirect_url], status: :see_other }
    end
  else
    render json: result, status: :unprocessable_content
  end
end

#indexObject



13
14
# File 'app/controllers/passkey_auth/webauthn/authentications_controller.rb', line 13

def index
end