rails_simple_auth 1.0.8 → 1.0.10
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: 5e3b095ff64262301ce80addfe5b6a2bcd05c3356bd36cd3cb0ba545ac78bccb
|
|
4
|
+
data.tar.gz: f076015e2bb501c1590eff06f722ae8d18a0dbcb307dd31ab934851abd45c83b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de19631e5a5e5f3db9792591442e53bdc29ae7cfc32fb877e2091256d499207d7d363bfa36fa6fbab33172153ca208077ed8bb7d9a0bc97c933877fdd6edfa7f
|
|
7
|
+
data.tar.gz: 95e036ece7c8518c326257e018b19b691c1dfe79f0785d562284dae2dc4ba67d28e9f4e962b3d4da0b0ffc5eac672aa8c53f1b8ba6628de9a85b041f65ee52e4
|
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.10] - 2026-01-19
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **OAuth authenticity token error** - Disabled OmniAuth's `AuthenticityTokenProtection` which was blocking OAuth requests even with valid CSRF tokens. POST-only enforcement already prevents CSRF attacks.
|
|
15
|
+
|
|
16
|
+
## [1.0.9] - 2026-01-19
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **OAuth failure logging** - Logs error type, strategy, and error message when OAuth fails to help debug authentication issues
|
|
21
|
+
|
|
10
22
|
## [1.0.8] - 2026-01-19
|
|
11
23
|
|
|
12
24
|
### Fixed
|
|
@@ -28,6 +28,17 @@ module RailsSimpleAuth
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def failure
|
|
31
|
+
error = request.env['omniauth.error']
|
|
32
|
+
error_type = request.env['omniauth.error.type']
|
|
33
|
+
strategy = request.env['omniauth.error.strategy']&.name
|
|
34
|
+
|
|
35
|
+
Rails.logger.error(
|
|
36
|
+
"[RailsSimpleAuth] OAuth failure: " \
|
|
37
|
+
"type=#{error_type.inspect}, " \
|
|
38
|
+
"strategy=#{strategy.inspect}, " \
|
|
39
|
+
"error=#{error&.message.inspect}"
|
|
40
|
+
)
|
|
41
|
+
|
|
31
42
|
redirect_to new_session_path, alert: 'Authentication failed. Please try again.'
|
|
32
43
|
end
|
|
33
44
|
end
|
|
@@ -24,9 +24,12 @@ module RailsSimpleAuth
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
# Secure OmniAuth by default - only allow POST to initiate OAuth (prevents CSRF)
|
|
27
|
+
# Disable OmniAuth's authenticity token protection since POST-only already prevents CSRF
|
|
28
|
+
# and Rails handles CSRF protection at the application level
|
|
27
29
|
initializer 'rails_simple_auth.omniauth', after: :load_config_initializers do
|
|
28
30
|
if defined?(OmniAuth)
|
|
29
31
|
OmniAuth.config.allowed_request_methods = %i[post]
|
|
32
|
+
OmniAuth.config.request_validation_phase = nil
|
|
30
33
|
end
|
|
31
34
|
end
|
|
32
35
|
end
|