devise-webauthn 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05eae23abbecd24f8a7baed2ae277525706623f23ad0966c3123d804cddaf41d
4
- data.tar.gz: be7b3304bb4da5197cd132f040d68f0e274b3525bfc8a7647cb52a6f61e85884
3
+ metadata.gz: 8272be7a84a98c8568d2149ef3e0e73dbabae206fa2947ebbcf44cdd5a427126
4
+ data.tar.gz: 3597cedab2a236c6c897fcf49e29145c7d924943b3e3128caf6dcf644461e31e
5
5
  SHA512:
6
- metadata.gz: aa6fc6a8b595229e5d2a0be46607e910443b8b2a33d3faa0728f86cc9b312f5e6bcb936ac1d7457499ed66266c3377dbf153c4bd21e43e9b2a491d89f02cbbdb
7
- data.tar.gz: 58f6f8c077d4186413234971bef5613d20d0021986a6968fa4c4cfe5e9d4f63869dec28f9be5fae2a15e0218e053a8fd9e4a017bc6cbe13d730f438404eefbd4
6
+ metadata.gz: '0564994b5a7091635d5927618339b23d15e538eb5c8a1c8f3ac2f8261013cd06b3c203bbbb8c4b5662161d96866cfdad4d87adcfbebfaf9155d96948df1ca50e'
7
+ data.tar.gz: 8ba40676150aa81956b1a78b5216e05947b883bf044c39e22012c21033a86daaa85d5fa2b95fadc697aaa3760a08f6dd5b19c4d82ee445989d5d9748ac4b7cfa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.1.2](https://github.com/cedarcode/devise-webauthn/compare/v0.1.1...v0.1.2/) - 2025-12-03
4
+
5
+ ### Fixed
6
+
7
+ - Fixed sign in with passkey for resources with name different from "User"
8
+
9
+ ## [v0.1.1](https://github.com/cedarcode/devise-webauthn/compare/v0.1.0...v0.1.1/) - 2025-11-13
10
+
11
+ ### Changed
12
+
13
+ - Updated gemspec metadata.
14
+
3
15
  ## [v0.1.0](https://github.com/cedarcode/devise-webauthn/compare/v0.0.0...v0.1.0/) - 2025-11-12
4
16
 
5
17
  ### Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devise-webauthn (0.1.0)
4
+ devise-webauthn (0.1.2)
5
5
  devise (~> 4.9)
6
6
  webauthn (~> 3.0)
7
7
 
@@ -13,9 +13,14 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = "Devise extension to support WebAuthn."
14
14
  spec.license = "MIT"
15
15
 
16
+ spec.homepage = "https://github.com/cedarcode/devise-webauthn"
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = spec.homepage
19
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
20
+
16
21
  # Specify which files should be added to the gem when it is released.
17
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
24
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
25
  end
21
26
  spec.bindir = "exe"
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Devise
4
4
  module Strategies
5
- class PasskeyAuthenticatable < Warden::Strategies::Base
5
+ class PasskeyAuthenticatable < Devise::Strategies::Base
6
6
  def valid?
7
7
  passkey_param.present? && session[:authentication_challenge].present?
8
8
  end
@@ -15,7 +15,8 @@ module Devise
15
15
 
16
16
  verify_passkeys(passkey_from_params, stored_passkey)
17
17
 
18
- success!(stored_passkey.user)
18
+ resource = stored_passkey.public_send(resource_name)
19
+ success!(resource)
19
20
  rescue WebAuthn::Error
20
21
  fail!(:passkey_verification_failed)
21
22
  ensure
@@ -38,6 +39,10 @@ module Devise
38
39
 
39
40
  stored_passkey.update!(sign_count: passkey_from_params.sign_count)
40
41
  end
42
+
43
+ def resource_name
44
+ mapping.to.name.underscore
45
+ end
41
46
  end
42
47
  end
43
48
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Devise
4
4
  module Webauthn
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-webauthn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cedarcode
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-12-03 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: devise
@@ -37,6 +38,7 @@ dependencies:
37
38
  - - "~>"
38
39
  - !ruby/object:Gem::Version
39
40
  version: '3.0'
41
+ description:
40
42
  email:
41
43
  - webauthn@cedarcode.com
42
44
  executables: []
@@ -87,10 +89,15 @@ files:
87
89
  - lib/generators/devise/webauthn/views_generator.rb
88
90
  - lib/generators/devise/webauthn/webauthn_credential_model/webauthn_credential_model_generator.rb
89
91
  - lib/generators/devise/webauthn/webauthn_id/webauthn_id_generator.rb
92
+ homepage: https://github.com/cedarcode/devise-webauthn
90
93
  licenses:
91
94
  - MIT
92
95
  metadata:
96
+ homepage_uri: https://github.com/cedarcode/devise-webauthn
97
+ source_code_uri: https://github.com/cedarcode/devise-webauthn
98
+ changelog_uri: https://github.com/cedarcode/devise-webauthn/blob/master/CHANGELOG.md
93
99
  rubygems_mfa_required: 'true'
100
+ post_install_message:
94
101
  rdoc_options: []
95
102
  require_paths:
96
103
  - lib
@@ -105,7 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
112
  - !ruby/object:Gem::Version
106
113
  version: '0'
107
114
  requirements: []
108
- rubygems_version: 3.6.7
115
+ rubygems_version: 3.2.1
116
+ signing_key:
109
117
  specification_version: 4
110
118
  summary: Devise extension to support WebAuthn.
111
119
  test_files: []