action_auth 1.7.0 → 1.7.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 +4 -4
- data/README.md +12 -6
- data/app/controllers/action_auth/sessions_controller.rb +5 -1
- data/lib/action_auth/configuration.rb +3 -0
- data/lib/action_auth/version.rb +1 -1
- data/lib/tasks/action_auth_tasks.rake +1 -0
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 846bfde761f3244d5de683c23fcd43d49d68c97716c77f67e728a32d4109f940
|
4
|
+
data.tar.gz: 2469883be6f32b6a788dddf7fe5ac1711bc7617b21d1d7cba10e434ef52b000a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3be75f50cd128fe1d12cac42c54d668ed79c23043da74419264d0097f17ca8a774357e3aa31bcfaa3feb5d5a3cefe76d77067dd1d137a531a3c500c3c7ce2d04
|
7
|
+
data.tar.gz: 4d16ef0e1ca005bf3a5f10f4ff49c2fbe9ebaa135d48221e5ebd5f428cde5a2486b38cc68d48147e93b6b0595c3a408009af750a1f366af543cab867440ea553
|
data/README.md
CHANGED
@@ -16,12 +16,15 @@ user experience akin to that offered by the well-regarded Devise gem.
|
|
16
16
|
- [Helper Methods](#helper-methods)
|
17
17
|
- [Restricting and Changing Routes](#restricting-and-changing-routes)
|
18
18
|
5. [Have I Been Pwned](#have-i-been-pwned)
|
19
|
-
6. [
|
20
|
-
7. [
|
21
|
-
8.
|
19
|
+
6. [Magic Links](#magic-links)
|
20
|
+
7. [SMS Authentication](#sms-authentication)
|
21
|
+
8. [Account Deletion](#account-deletion)
|
22
|
+
9. [WebAuthn](#webauthn)
|
23
|
+
10. [Within Your Application](#within-your-application)
|
24
|
+
11. Customizing
|
22
25
|
- [Sign In Page](https://github.com/kobaltz/action_auth/wiki/Overriding-Sign-In-page-view)
|
23
|
-
|
24
|
-
|
26
|
+
12. [License](#license)
|
27
|
+
13. [Credits](#credits)
|
25
28
|
|
26
29
|
## Breaking Changes
|
27
30
|
|
@@ -126,6 +129,8 @@ ActionAuth.configure do |config|
|
|
126
129
|
config.webauthn_enabled = true # defined?(WebAuthn)
|
127
130
|
config.webauthn_origin = "http://localhost:3000" # or "https://example.com"
|
128
131
|
config.webauthn_rp_name = Rails.application.class.to_s.deconstantize
|
132
|
+
|
133
|
+
config.insert_cookie_domain = false
|
129
134
|
end
|
130
135
|
|
131
136
|
Rails.application.config.after_initialize do
|
@@ -254,7 +259,7 @@ an email to the user with a link that will log them in. This is a great way to a
|
|
254
259
|
without having to remember a password. This is especially useful for users who may not have a password
|
255
260
|
manager or have a hard time remembering passwords.
|
256
261
|
|
257
|
-
|
262
|
+
## SMS Authentication
|
258
263
|
|
259
264
|
SMS Authentication is disabled by default. The purpose of this is to allow users to authenticate
|
260
265
|
with a phone number. This is useful and specific to applications that may require a phone number
|
@@ -313,6 +318,7 @@ will want to style this to fit your application and have some kind of confirmati
|
|
313
318
|
<%= button_to "Delete Account", action_auth.users_path, method: :delete %>
|
314
319
|
</p>
|
315
320
|
```
|
321
|
+
|
316
322
|
## WebAuthn
|
317
323
|
|
318
324
|
ActionAuth's approach for WebAuthn is simplicity. It is used as a multifactor authentication step,
|
@@ -19,7 +19,9 @@ module ActionAuth
|
|
19
19
|
else
|
20
20
|
return if check_if_email_is_verified(user)
|
21
21
|
@session = user.sessions.create
|
22
|
-
|
22
|
+
session_token_hash = { value: @session.id, httponly: true }
|
23
|
+
session_token_hash[:domain] = :all if ActionAuth.configuration.insert_cookie_domain
|
24
|
+
cookies.signed.permanent[:session_token] = session_token_hash
|
23
25
|
redirect_to main_app.root_path, notice: "Signed in successfully"
|
24
26
|
end
|
25
27
|
else
|
@@ -30,6 +32,8 @@ module ActionAuth
|
|
30
32
|
def destroy
|
31
33
|
session = Current.user.sessions.find(params[:id])
|
32
34
|
session.destroy
|
35
|
+
cookies.delete(:session_token)
|
36
|
+
response.headers["Clear-Site-Data"] = '"cache","storage"'
|
33
37
|
redirect_to main_app.root_path, notice: "That session has been logged out"
|
34
38
|
end
|
35
39
|
|
@@ -13,6 +13,7 @@ module ActionAuth
|
|
13
13
|
attr_accessor :webauthn_origin
|
14
14
|
attr_accessor :webauthn_rp_name
|
15
15
|
|
16
|
+
attr_accessor :insert_cookie_domain
|
16
17
|
|
17
18
|
def initialize
|
18
19
|
@allow_user_deletion = true
|
@@ -26,6 +27,8 @@ module ActionAuth
|
|
26
27
|
@webauthn_enabled = defined?(WebAuthn)
|
27
28
|
@webauthn_origin = "http://localhost:3000"
|
28
29
|
@webauthn_rp_name = Rails.application.class.to_s.deconstantize
|
30
|
+
|
31
|
+
@insert_cookie_domain = false
|
29
32
|
end
|
30
33
|
|
31
34
|
def allow_user_deletion?
|
data/lib/action_auth/version.rb
CHANGED
@@ -18,6 +18,7 @@ namespace :action_auth do
|
|
18
18
|
# config.webauthn_enabled = true # defined?(WebAuthn)
|
19
19
|
# config.webauthn_origin = "http://localhost:3000" # or "https://example.com"
|
20
20
|
# config.webauthn_rp_name = Rails.application.class.to_s.deconstantize
|
21
|
+
# config.insert_cookie_domain = false
|
21
22
|
# end
|
22
23
|
#
|
23
24
|
# Rails.application.config.after_initialize do
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Kimura
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-17 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rails
|
@@ -118,7 +117,6 @@ metadata:
|
|
118
117
|
homepage_uri: https://www.github.com/kobaltz/action_auth
|
119
118
|
source_code_uri: https://www.github.com/kobaltz/action_auth
|
120
119
|
changelog_uri: https://www.github.com/kobaltz/action_auth/CHANGELOG.md
|
121
|
-
post_install_message:
|
122
120
|
rdoc_options: []
|
123
121
|
require_paths:
|
124
122
|
- lib
|
@@ -133,8 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
131
|
- !ruby/object:Gem::Version
|
134
132
|
version: '0'
|
135
133
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
137
|
-
signing_key:
|
134
|
+
rubygems_version: 3.6.2
|
138
135
|
specification_version: 4
|
139
136
|
summary: A simple Rails engine for authorization.
|
140
137
|
test_files: []
|