action_auth 1.7.2 → 1.7.3

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: 846bfde761f3244d5de683c23fcd43d49d68c97716c77f67e728a32d4109f940
4
- data.tar.gz: 2469883be6f32b6a788dddf7fe5ac1711bc7617b21d1d7cba10e434ef52b000a
3
+ metadata.gz: 15d12d1b57a930d83e079185b0218a3715976bbbfef2e0d711523b2aae9bae85
4
+ data.tar.gz: 899692e5c6110136cde4a48b919d73287e3c93c04dfc8986ea89384ef05a4f74
5
5
  SHA512:
6
- metadata.gz: 3be75f50cd128fe1d12cac42c54d668ed79c23043da74419264d0097f17ca8a774357e3aa31bcfaa3feb5d5a3cefe76d77067dd1d137a531a3c500c3c7ce2d04
7
- data.tar.gz: 4d16ef0e1ca005bf3a5f10f4ff49c2fbe9ebaa135d48221e5ebd5f428cde5a2486b38cc68d48147e93b6b0595c3a408009af750a1f366af543cab867440ea553
6
+ metadata.gz: 2acc300b848aa222fc929ba6622db8b539067a7ed128faba00684c57c470fd67d66b893d3fb16b64e2300bad79c3d2935ddb3f9daf4673d5b0f8aa241cb2b289
7
+ data.tar.gz: cf88f1aacdf1fad6087e5669a1130754c856f6cbbc8638dfc17a59f0369bc5a2a62cb33b7d93a7fc04a3cc62e1f02d6747c4a316b88e8d40a88f1ef9bbebf68b
data/README.md CHANGED
@@ -26,42 +26,11 @@ user experience akin to that offered by the well-regarded Devise gem.
26
26
  12. [License](#license)
27
27
  13. [Credits](#credits)
28
28
 
29
- ## Breaking Changes
30
29
 
31
- With the release of v1.0.0, there are some breaking changes that have been introduced. The
32
- biggest change is that the `ActionAuth::User` model now uses the table name of `users` instead
33
- of `action_auth_users`. This was done to make it easier to integrate with your application
34
- without having to worry about the table name. If you have an existing application that is
35
- using ActionAuth, you will need to rename the table to `users` with a migration like
30
+ ## Minimum Requirements
36
31
 
37
- ```ruby
38
- rename_table :action_auth_users, :users
39
- ```
40
-
41
- Coming from `v0.3.0` to `v1.0.0`, you will need to create a migration to rename the table and foreign keys.
42
-
43
- ```ruby
44
- class UpgradeActionAuth < ActiveRecord::Migration[7.1]
45
- def change
46
- rename_table :action_auth_users, :users
47
-
48
- rename_table :action_auth_sessions, :sessions
49
- rename_column :sessions, :action_auth_user_id, :user_id
50
-
51
- rename_table :action_auth_webauthn_credentials, :webauthn_credentials
52
- rename_column :webauthn_credentials, :action_auth_user_id, :user_id
53
- end
54
- end
55
- ```
56
-
57
- You will then need to undo the migrations where the foreign keys were added in cases where `foreign_key: true` was
58
- changed to `foreign_key: { to_table: 'action_auth_users' }`. You can do this for each table with a migration like:
59
-
60
- ```ruby
61
- add_foreign_key :user_settings, :users, column: :user_id unless foreign_key_exists?(:user_settings, :users)
62
- add_foreign_key :profiles, :users, column: :user_id unless foreign_key_exists?(:profiles, :users)
63
- add_foreign_key :nfcs, :users, column: :user_id unless foreign_key_exists?(:nfcs, :users)
64
- ```
32
+ - Ruby 3.3.0 or later recommended
33
+ - Rails 7.2.0 or later **required**
65
34
 
66
35
  ## Installation
67
36
 
@@ -3,6 +3,12 @@ module ActionAuth
3
3
  before_action :set_current_request_details
4
4
  before_action :authenticate_user!, only: [:index, :destroy]
5
5
 
6
+ rate_limit to: 5,
7
+ within: 20.seconds,
8
+ only: :create,
9
+ name: "slow-throttle",
10
+ with: -> { redirect_to sign_in_path, alert: "Try again later." }
11
+
6
12
  def index
7
13
  @action_auth_wide = true
8
14
  @sessions = Current.user.sessions.order(created_at: :desc)
@@ -1,3 +1,3 @@
1
1
  module ActionAuth
2
- VERSION = "1.7.2"
2
+ VERSION = "1.7.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Kimura
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-17 00:00:00.000000000 Z
10
+ date: 2025-01-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails