diff --git a/Gemfile.lock b/Gemfile.lock index 334f42c..1830e63 100755 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - action_auth (0.2.6) + action_auth (0.2.7) bcrypt (~> 3.1.0) rails (~> 7.1) diff --git a/app/models/action_auth/user.rb b/app/models/action_auth/user.rb index ed7c783..b7bd765 100755 --- a/app/models/action_auth/user.rb +++ b/app/models/action_auth/user.rb @@ -5,7 +5,7 @@ class User < ApplicationRecord has_many :action_auth_sessions, dependent: :destroy, class_name: "ActionAuth::Session", foreign_key: "action_auth_user_id" - if ActionAuth.configuration.webauthn_enabled? + if ActionAuth.configuration&.webauthn_enabled? has_many :action_auth_webauthn_credentials, dependent: :destroy, class_name: "ActionAuth::WebauthnCredential", foreign_key: "action_auth_user_id" end diff --git a/config/routes.rb b/config/routes.rb index 0bdb471..0cf7576 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,7 +11,7 @@ resource :password_reset, only: [:new, :edit, :create, :update] end - if ActionAuth.configuration.webauthn_enabled? + if ActionAuth.configuration&.webauthn_enabled? resources :webauthn_credentials, only: [:new, :create, :destroy] do post :options, on: :collection, as: 'options_for' end diff --git a/lib/action_auth/version.rb b/lib/action_auth/version.rb index a4da0fd..4311432 100755 --- a/lib/action_auth/version.rb +++ b/lib/action_auth/version.rb @@ -1,3 +1,3 @@ module ActionAuth - VERSION = "0.2.6" + VERSION = "0.2.7" end