rails_simple_auth 1.0.11 → 1.0.13
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67feacab83a245360621b640e8cd8a7f502a57e073b100e5d30508238db02f7d
|
|
4
|
+
data.tar.gz: dea41d844cf5a18ff07d1c8d3d30fb1d0595c244e50f281a571fb02f443d8996
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd12763f2e5fc6121d20564976631d0c5286b02d078771508e43cbc44eea0b546d9c8e4bf201e3fdd0c6d5ffb6f9373f4c09748502e2ba838708bdf49b2589d9
|
|
7
|
+
data.tar.gz: 20fb18b5ee2969bb059dda696bb8378f1493673a0a2a20de15935c8bb76edbee7dc2215c2a343799301dc07935ddd245ca38d8bf4788d3d6d74d43ef5e321a15
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.13] - 2026-01-19
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **OAuth controller uses display names** - Success and failure messages now use `oauth_provider_display_name` instead of raw provider name
|
|
15
|
+
|
|
16
|
+
## [1.0.12] - 2026-01-19
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **OAuth view helper** - Simple `oauth_display_name(provider)` helper for views
|
|
21
|
+
```erb
|
|
22
|
+
Continue with <%= oauth_display_name(provider) %>
|
|
23
|
+
```
|
|
24
|
+
|
|
10
25
|
## [1.0.11] - 2026-01-19
|
|
11
26
|
|
|
12
27
|
### 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
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RailsSimpleAuth
|
|
4
|
+
module OauthHelper
|
|
5
|
+
# Get display name for an OAuth provider
|
|
6
|
+
# Usage: oauth_display_name(:google_oauth2) => "Google"
|
|
7
|
+
def oauth_display_name(provider)
|
|
8
|
+
RailsSimpleAuth.configuration.oauth_provider_display_name(provider)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -15,6 +15,10 @@ module RailsSimpleAuth
|
|
|
15
15
|
include RailsSimpleAuth::Controllers::Concerns::Authentication
|
|
16
16
|
include RailsSimpleAuth::Controllers::Concerns::SessionManagement
|
|
17
17
|
end
|
|
18
|
+
|
|
19
|
+
ActiveSupport.on_load(:action_view) do
|
|
20
|
+
include RailsSimpleAuth::OauthHelper
|
|
21
|
+
end
|
|
18
22
|
end
|
|
19
23
|
|
|
20
24
|
initializer 'rails_simple_auth.model' do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Kuznetsov
|
|
@@ -57,6 +57,7 @@ files:
|
|
|
57
57
|
- app/controllers/rails_simple_auth/passwords_controller.rb
|
|
58
58
|
- app/controllers/rails_simple_auth/registrations_controller.rb
|
|
59
59
|
- app/controllers/rails_simple_auth/sessions_controller.rb
|
|
60
|
+
- app/helpers/rails_simple_auth/oauth_helper.rb
|
|
60
61
|
- app/mailers/rails_simple_auth/auth_mailer.rb
|
|
61
62
|
- app/views/layouts/rails_simple_auth.html.erb
|
|
62
63
|
- app/views/rails_simple_auth/confirmations/new.html.erb
|