action_auth 0.2.5 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b759c3db6150a889321f9fae95ada3c25602811ead1f523bbcb40e2d357aeb0
4
- data.tar.gz: 83b68428631ea15336325a72c1c403044cefe8b8372f594cd7b01afab820535d
3
+ metadata.gz: f49c1498dcdca45b8440701445af29b364ccbee5c1c8d7c0a1ef4f9fdcbd34f4
4
+ data.tar.gz: 174dfea10cbafabf20ac5d74a3f0757579b3b3dd51537e5261c69546b3d09c58
5
5
  SHA512:
6
- metadata.gz: 254819cd786c3592aefefcd33cec0d01eae5465a776cd303df4b5163f9699576b26e0b57a0ea35f437beb54e5f117dc0497a543e913c67891a21aa435e3ce1e2
7
- data.tar.gz: 1c20f3bd253414b9cd4fb0771df7a694ef33ea8dd3af460604880dda6373376d28cc7353ac4dee83b4159341532a06439b9699e0bd86e7e8230149ffc3104d88
6
+ metadata.gz: 2ddd7429775b10815decc90e8df7a5c6cc2d76e882734d33fc5ab1c3a751476033c7b57a772ed876ff922455b23d40f47dbbad5296bbd1c9e399157dfa87d11b
7
+ data.tar.gz: ec39a8fc004d545f0993ff02946882cbd46e57099da40e3834d7ac4bba0466bb55b10cfd58df2e77f16c1edc714a9f7da2660c854353eb30e67d52a83c9ffba1
@@ -5,7 +5,7 @@ module ActionAuth
5
5
  has_many :action_auth_sessions, dependent: :destroy,
6
6
  class_name: "ActionAuth::Session", foreign_key: "action_auth_user_id"
7
7
 
8
- if ActionAuth.configuration.webauthn_enabled?
8
+ if ActionAuth.configuration&.webauthn_enabled?
9
9
  has_many :action_auth_webauthn_credentials, dependent: :destroy,
10
10
  class_name: "ActionAuth::WebauthnCredential", foreign_key: "action_auth_user_id"
11
11
  end
data/config/routes.rb CHANGED
@@ -11,7 +11,7 @@ ActionAuth::Engine.routes.draw do
11
11
  resource :password_reset, only: [:new, :edit, :create, :update]
12
12
  end
13
13
 
14
- if ActionAuth.configuration.webauthn_enabled?
14
+ if ActionAuth.configuration&.webauthn_enabled?
15
15
  resources :webauthn_credentials, only: [:new, :create, :destroy] do
16
16
  post :options, on: :collection, as: 'options_for'
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module ActionAuth
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.7"
3
3
  end
data/lib/action_auth.rb CHANGED
@@ -14,6 +14,8 @@ module ActionAuth
14
14
 
15
15
  def configure_webauthn
16
16
  return unless configuration.webauthn_enabled?
17
+ return unless defined?(WebAuthn)
18
+
17
19
  WebAuthn.configure do |config|
18
20
  config.origin = configuration.webauthn_origin
19
21
  config.rp_name = configuration.webauthn_rp_name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Kimura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-13 00:00:00.000000000 Z
11
+ date: 2024-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.5.4
124
+ rubygems_version: 3.5.3
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: A simple Rails engine for authorization.