rails_simple_auth 1.0.13 → 1.1.0
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/CHANGELOG.md +21 -0
- data/app/controllers/rails_simple_auth/omniauth_callbacks_controller.rb +1 -1
- data/{lib/rails_simple_auth/models → app/models/rails_simple_auth}/session.rb +4 -2
- data/lib/generators/rails_simple_auth/css/templates/rails_simple_auth.css +49 -16
- data/lib/generators/rails_simple_auth/install/install_generator.rb +1 -1
- data/lib/rails_simple_auth/configuration.rb +1 -1
- data/lib/rails_simple_auth/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad68672c8d3cb2ae020bb5ca15c50806b64a3593734088c5bae4ed351b1683d1
|
|
4
|
+
data.tar.gz: 195845cbc41e1163f5212f3dc2448093bb13a278dbf58332189e115983ed90b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc42b623955ccdfcc4737eb58c2b70efb0fb93f6c7633791d81d89ed8f0ce396277dddae529a25e38906324ef7256e34bcbcfb0bbe3dc3314a209c0c9e922dab
|
|
7
|
+
data.tar.gz: b496b38e1c2369759e8dbe21b927f21d43a5cd79da47882290e322444658053b7a415cfe42888a35f3cc5ac1101c4b1a0a7bf91f68fa8859f7d883e0c1594d44
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.1.0] - 2026-01-20
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Generator E2E test infrastructure** - CI pipeline now validates that generators produce working views
|
|
15
|
+
- `bin/test_generator` script creates fresh Rails app, runs generators, and executes E2E tests
|
|
16
|
+
- Reusable Page Object test templates in `test/generator_test_files/`
|
|
17
|
+
- GitHub Actions `generator-test` job runs after unit tests pass
|
|
18
|
+
- **Local CI script** - `bin/ci` for running lint and tests locally before pushing
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Session model autoloading** - Moved `RailsSimpleAuth::Session` from `lib/` to `app/models/` for proper Rails engine autoloading
|
|
23
|
+
- **CSS form alignment** - Fixed inconsistent margins on form inputs and buttons
|
|
24
|
+
|
|
25
|
+
## [1.0.14] - 2026-01-20
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- **Rails 8.1 generator compatibility** - Renamed `create_migration` method to `copy_migration_file` in install generator to avoid conflict with Rails 8.1's internal migration generator methods
|
|
30
|
+
|
|
10
31
|
## [1.0.13] - 2026-01-19
|
|
11
32
|
|
|
12
33
|
### Fixed
|
|
@@ -35,7 +35,7 @@ module RailsSimpleAuth
|
|
|
35
35
|
strategy = request.env['omniauth.error.strategy']&.name
|
|
36
36
|
|
|
37
37
|
Rails.logger.error(
|
|
38
|
-
|
|
38
|
+
'[RailsSimpleAuth] OAuth failure: ' \
|
|
39
39
|
"type=#{error_type.inspect}, " \
|
|
40
40
|
"strategy=#{strategy.inspect}, " \
|
|
41
41
|
"error=#{error&.message.inspect}"
|
|
@@ -4,8 +4,10 @@ module RailsSimpleAuth
|
|
|
4
4
|
class Session < ::ApplicationRecord
|
|
5
5
|
self.table_name = 'sessions'
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
|
|
7
|
+
# NOTE: class_name is evaluated at class load time. Users customizing
|
|
8
|
+
# user_class_name must configure it before this model loads (e.g., in
|
|
9
|
+
# config/application.rb or an early-loading initializer).
|
|
10
|
+
belongs_to :user, class_name: RailsSimpleAuth.configuration.user_class_name
|
|
9
11
|
|
|
10
12
|
scope :recent, -> { order(created_at: :desc) }
|
|
11
13
|
scope :active, -> { where(created_at: RailsSimpleAuth.configuration.session_expiry.ago..) }
|
|
@@ -11,37 +11,49 @@
|
|
|
11
11
|
* }
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
/* ============================================================================
|
|
15
|
+
Base Reset
|
|
16
|
+
============================================================================ */
|
|
17
|
+
|
|
18
|
+
.rsa-auth-form *,
|
|
19
|
+
.rsa-auth-form *::before,
|
|
20
|
+
.rsa-auth-form *::after {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
}
|
|
23
|
+
|
|
14
24
|
/* ============================================================================
|
|
15
25
|
CSS Variables (Override these to customize)
|
|
16
26
|
============================================================================ */
|
|
17
27
|
|
|
18
28
|
:root {
|
|
19
29
|
/* Primary Colors */
|
|
20
|
-
--rsa-color-primary: #
|
|
21
|
-
--rsa-color-primary-hover: #
|
|
30
|
+
--rsa-color-primary: #4f46e5;
|
|
31
|
+
--rsa-color-primary-hover: #4338ca;
|
|
32
|
+
--rsa-color-primary-light: #eef2ff;
|
|
22
33
|
|
|
23
34
|
/* Background Colors */
|
|
24
|
-
--rsa-color-background: #
|
|
35
|
+
--rsa-color-background: #f8fafc;
|
|
25
36
|
--rsa-color-background-form: #ffffff;
|
|
26
|
-
--rsa-color-surface: #
|
|
27
|
-
--rsa-color-surface-hover: #
|
|
37
|
+
--rsa-color-surface: #f1f5f9;
|
|
38
|
+
--rsa-color-surface-hover: #e2e8f0;
|
|
28
39
|
|
|
29
40
|
/* Text Colors */
|
|
30
|
-
--rsa-color-text: #
|
|
31
|
-
--rsa-color-text-muted: #
|
|
32
|
-
--rsa-color-text-dark: #
|
|
41
|
+
--rsa-color-text: #475569;
|
|
42
|
+
--rsa-color-text-muted: #64748b;
|
|
43
|
+
--rsa-color-text-dark: #0f172a;
|
|
33
44
|
|
|
34
45
|
/* Border Colors */
|
|
35
|
-
--rsa-color-border: #
|
|
36
|
-
--rsa-color-border-form: #
|
|
46
|
+
--rsa-color-border: #e2e8f0;
|
|
47
|
+
--rsa-color-border-form: #cbd5e1;
|
|
37
48
|
|
|
38
49
|
/* Semantic Colors */
|
|
39
50
|
--rsa-color-danger: #dc2626;
|
|
51
|
+
--rsa-color-danger-hover: #b91c1c;
|
|
40
52
|
--rsa-color-success: #16a34a;
|
|
41
53
|
--rsa-color-white: #ffffff;
|
|
42
54
|
|
|
43
55
|
/* Focus Ring */
|
|
44
|
-
--rsa-color-focus-ring: rgba(
|
|
56
|
+
--rsa-color-focus-ring: rgba(79, 70, 229, 0.4);
|
|
45
57
|
|
|
46
58
|
/* OAuth Provider Colors */
|
|
47
59
|
--rsa-color-google: #4285f4;
|
|
@@ -57,15 +69,26 @@
|
|
|
57
69
|
--rsa-space-5: 1.25rem;
|
|
58
70
|
--rsa-space-6: 1.5rem;
|
|
59
71
|
--rsa-space-8: 2rem;
|
|
72
|
+
--rsa-space-10: 2.5rem;
|
|
60
73
|
|
|
61
74
|
/* Border Radius */
|
|
62
|
-
--rsa-radius-sm: 0.
|
|
63
|
-
--rsa-radius-md: 0.
|
|
64
|
-
--rsa-radius-lg: 0.
|
|
65
|
-
--rsa-radius-xl:
|
|
75
|
+
--rsa-radius-sm: 0.375rem;
|
|
76
|
+
--rsa-radius-md: 0.5rem;
|
|
77
|
+
--rsa-radius-lg: 0.75rem;
|
|
78
|
+
--rsa-radius-xl: 1rem;
|
|
79
|
+
--rsa-radius-full: 9999px;
|
|
80
|
+
|
|
81
|
+
/* Shadows */
|
|
82
|
+
--rsa-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
83
|
+
--rsa-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
84
|
+
--rsa-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
85
|
+
--rsa-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
66
86
|
|
|
67
87
|
/* Border Width */
|
|
68
88
|
--rsa-border-thin: 1px;
|
|
89
|
+
|
|
90
|
+
/* Font */
|
|
91
|
+
--rsa-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
69
92
|
}
|
|
70
93
|
|
|
71
94
|
/* ============================================================================
|
|
@@ -93,6 +116,10 @@
|
|
|
93
116
|
background-color: var(--rsa-color-background-form);
|
|
94
117
|
}
|
|
95
118
|
|
|
119
|
+
.rsa-auth-form > * {
|
|
120
|
+
width: 100%;
|
|
121
|
+
}
|
|
122
|
+
|
|
96
123
|
.rsa-auth-form__title {
|
|
97
124
|
margin-bottom: var(--rsa-space-2);
|
|
98
125
|
font-size: 1.5rem;
|
|
@@ -109,6 +136,11 @@
|
|
|
109
136
|
}
|
|
110
137
|
|
|
111
138
|
.rsa-auth-form__form {
|
|
139
|
+
display: block;
|
|
140
|
+
width: 100%;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.rsa-auth-form__form > * {
|
|
112
144
|
width: 100%;
|
|
113
145
|
}
|
|
114
146
|
|
|
@@ -174,8 +206,9 @@
|
|
|
174
206
|
.rsa-auth-form__actions {
|
|
175
207
|
display: flex;
|
|
176
208
|
flex-direction: column;
|
|
177
|
-
align-items:
|
|
209
|
+
align-items: stretch;
|
|
178
210
|
margin-top: var(--rsa-space-6);
|
|
211
|
+
width: 100%;
|
|
179
212
|
}
|
|
180
213
|
|
|
181
214
|
.rsa-auth-form__submit {
|
|
@@ -23,7 +23,7 @@ module RailsSimpleAuth
|
|
|
23
23
|
template 'initializer.rb', 'config/initializers/rails_simple_auth.rb'
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def
|
|
26
|
+
def copy_migration_file
|
|
27
27
|
return if options[:skip_migration]
|
|
28
28
|
|
|
29
29
|
migration_template 'migration.rb', 'db/migrate/add_rails_simple_auth.rb'
|
|
@@ -115,7 +115,7 @@ module RailsSimpleAuth
|
|
|
115
115
|
# Falls back to titleized provider name if no custom name is configured
|
|
116
116
|
def oauth_provider_display_name(provider)
|
|
117
117
|
provider_sym = provider.to_sym
|
|
118
|
-
oauth_provider_names[provider_sym] || provider.to_s.gsub(/_oauth2$/,
|
|
118
|
+
oauth_provider_names[provider_sym] || provider.to_s.gsub(/_oauth2$/, '').titleize
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
def rate_limit_for(action)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_simple_auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Kuznetsov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bcrypt
|
|
@@ -59,6 +59,7 @@ files:
|
|
|
59
59
|
- app/controllers/rails_simple_auth/sessions_controller.rb
|
|
60
60
|
- app/helpers/rails_simple_auth/oauth_helper.rb
|
|
61
61
|
- app/mailers/rails_simple_auth/auth_mailer.rb
|
|
62
|
+
- app/models/rails_simple_auth/session.rb
|
|
62
63
|
- app/views/layouts/rails_simple_auth.html.erb
|
|
63
64
|
- app/views/rails_simple_auth/confirmations/new.html.erb
|
|
64
65
|
- app/views/rails_simple_auth/mailers/confirmation.html.erb
|
|
@@ -90,7 +91,6 @@ files:
|
|
|
90
91
|
- lib/rails_simple_auth/models/concerns/oauth_connectable.rb
|
|
91
92
|
- lib/rails_simple_auth/models/concerns/temporary_user.rb
|
|
92
93
|
- lib/rails_simple_auth/models/current.rb
|
|
93
|
-
- lib/rails_simple_auth/models/session.rb
|
|
94
94
|
- lib/rails_simple_auth/routes.rb
|
|
95
95
|
- lib/rails_simple_auth/version.rb
|
|
96
96
|
homepage: https://github.com/ivankuznetsov/rails_simple_auth
|