rails_simple_auth 1.0.12 → 1.0.14
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 +12 -0
- data/app/controllers/rails_simple_auth/omniauth_callbacks_controller.rb +5 -3
- 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 +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5eb9879278413485651d5d0010eeb0ba53dda9a30a2d573684f33fcb62e53755
|
|
4
|
+
data.tar.gz: fff10fb64503a8ed9bb1d452868e2685041078c51ede6872354b960a8cf4844c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b446728d3424b6e1a57922604b09ee457ad2cb693aa08f768c18bdafd6e57835f4edd28fde7c566f9c12177a874a27e72835c27cadc2ea44cf829261aa3918a4
|
|
7
|
+
data.tar.gz: ea3967d2d0749125fb53ee0567074a81e58de6a041853471022690efe1c9af2bdedfb6f75657250510b79570de7c734364479f32627eeb7a9c192d8d13254b17
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.14] - 2026-01-20
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **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
|
|
15
|
+
|
|
16
|
+
## [1.0.13] - 2026-01-19
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **OAuth controller uses display names** - Success and failure messages now use `oauth_provider_display_name` instead of raw provider name
|
|
21
|
+
|
|
10
22
|
## [1.0.12] - 2026-01-19
|
|
11
23
|
|
|
12
24
|
### Added
|
|
@@ -16,14 +16,16 @@ module RailsSimpleAuth
|
|
|
16
16
|
|
|
17
17
|
user = user_class.from_oauth(auth_hash)
|
|
18
18
|
|
|
19
|
+
display_name = RailsSimpleAuth.configuration.oauth_provider_display_name(provider)
|
|
20
|
+
|
|
19
21
|
if user&.persisted?
|
|
20
22
|
destroy_temporary_user_session(user)
|
|
21
23
|
create_session_for(user)
|
|
22
24
|
run_after_sign_in_callback(user)
|
|
23
25
|
redirect_to resolve_path(:after_sign_in_path),
|
|
24
|
-
notice: "Signed in successfully with #{
|
|
26
|
+
notice: "Signed in successfully with #{display_name}."
|
|
25
27
|
else
|
|
26
|
-
redirect_to new_session_path, alert: "Could not authenticate with #{
|
|
28
|
+
redirect_to new_session_path, alert: "Could not authenticate with #{display_name}."
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
31
|
|
|
@@ -33,7 +35,7 @@ module RailsSimpleAuth
|
|
|
33
35
|
strategy = request.env['omniauth.error.strategy']&.name
|
|
34
36
|
|
|
35
37
|
Rails.logger.error(
|
|
36
|
-
|
|
38
|
+
'[RailsSimpleAuth] OAuth failure: ' \
|
|
37
39
|
"type=#{error_type.inspect}, " \
|
|
38
40
|
"strategy=#{strategy.inspect}, " \
|
|
39
41
|
"error=#{error&.message.inspect}"
|
|
@@ -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.0.14
|
|
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
|