has_secure_passkey 0.1.0 → 0.2.1

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: 11ce9f55e205c9be680e02f1159a9880bde3abae369530bf6423235f90b7fbf0
4
- data.tar.gz: 93f6d76763e8fc4910de588288daf9ce8451070c0bfc615fd8ab2a691f3c6898
3
+ metadata.gz: c54c1bf83e6becd02d657ba22ec4884ed14e7b99b79afc75f8caf859c8be2694
4
+ data.tar.gz: 72a094191bbb4464689483eabb01fa35836e8bdfb3190200bfafce2288353b91
5
5
  SHA512:
6
- metadata.gz: 770fbbcf695704aa6e065f3b94ae239e5b91bafef8ac70c96aa949553987403186dfa31015c7101dad74b56b85b5abb7a1cacfd8d80424522e532bae24348ae1
7
- data.tar.gz: 5abfed79a375a27985383b2235efd4d522b0a10449c22a186a1c257dd45a2c714b138b12c2da26cc4bea2271569acc38570f548b754a7f2370251a18b119ed55
6
+ metadata.gz: 4aeea114f586d90179990ea7ae2ceb6d0000799e8be424834309709639bb5c679f7c349b98a8ef5e30c69d15ab4b77c734ce15850d7c4a318d1ed9bcfdcbbecb
7
+ data.tar.gz: 0622ccab3811b45ac7c8fb69eaa0dd36c0eb081c18591ca29001aedce843af69eb96422d0457619cd87fbf098bec7934116a6e12ea185b78d62fafadcd9c6d4c
@@ -25,8 +25,12 @@ module HasSecurePasskey
25
25
  **options)
26
26
  end
27
27
 
28
- def button_to_passkey_login(text, path, **options)
29
- button_to text, has_secure_passkey.challenges_path(path), **options
28
+ def button_to_passkey_login(text, path = nil, **options, &block)
29
+ if block_given?
30
+ button_to has_secure_passkey.challenges_path(text), **options, &block
31
+ else
32
+ button_to text, has_secure_passkey.challenges_path(path), **options
33
+ end
30
34
  end
31
35
  end
32
36
  end
@@ -1,4 +1,4 @@
1
- <%%= form_with model: @person, url: registration_path do |f| %>
1
+ <%%= form_with model: @person, url: registration_path, id: "new-registration" do |f| %>
2
2
  <%% if @person.errors.any? %>
3
3
  <div style="color: red">
4
4
  <h2><%%= pluralize(@person.errors.count, "error") %> prohibited this person from being saved:</h2>
@@ -1,3 +1,3 @@
1
1
  module HasSecurePasskey
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_secure_passkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pezza
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2024-10-31 00:00:00.000000000 Z
10
+ date: 2024-11-03 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails