activeadmin-oidc 2.0.0 → 2.0.1
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: 1a4d32669000d3de07114d54dc1c5d408899c1c8cf40e86b154e328ab08ed385
|
|
4
|
+
data.tar.gz: d1f002c56666e32b794bc1024a37b8bb06e275642c625b198664febd7caf6805
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79d676e27f836c5d271925d067cb5a072450e237394b07a590ac988b779ff5200a39c79208170ec3ef930837b8ad46dbf0f97e8403b9899fb73c1a6983092ab9
|
|
7
|
+
data.tar.gz: 13ac29d12fda8a44ba24aa992ac61d65f63c607894e576d66276cf18f2fa478f26b881b335bf93f767296c65c2c35a9d43b1bf76ddcb48d19078dd75ce94bb8f
|
|
@@ -74,14 +74,18 @@ module ActiveAdmin
|
|
|
74
74
|
stored_location_for(resource) || '/admin'
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
-
# Devise's
|
|
78
|
-
# `
|
|
79
|
-
#
|
|
80
|
-
#
|
|
81
|
-
# `
|
|
82
|
-
#
|
|
77
|
+
# Devise's `new_session_path(scope)` is only generated when
|
|
78
|
+
# `:database_authenticatable` is in the mapping's `used_helpers`,
|
|
79
|
+
# so an OIDC-only model never gets it. The engine mounts
|
|
80
|
+
# `new_<scope>_session_path` itself, but the helper lives on
|
|
81
|
+
# whichever route set the mapping's `router_name` points at —
|
|
82
|
+
# main_app by default, or `<engine_name>` for hosts that mount
|
|
83
|
+
# Devise inside a Rails engine. Replicate Devise's own dispatch
|
|
84
|
+
# so the right context is asked.
|
|
83
85
|
def after_omniauth_failure_path_for(scope)
|
|
84
|
-
|
|
86
|
+
router_name = ::Devise.mappings[scope].router_name
|
|
87
|
+
context = router_name ? send(router_name) : self
|
|
88
|
+
context.public_send(:"new_#{scope}_session_path")
|
|
85
89
|
end
|
|
86
90
|
end
|
|
87
91
|
end
|