activeadmin-oidc 2.1.2 → 2.1.3
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/lib/activeadmin/oidc/engine.rb +18 -2
- data/lib/activeadmin/oidc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 352c557fd647f3422d80408f88f874cb995d6ce588dd2265263b3d6bf0da0030
|
|
4
|
+
data.tar.gz: 488b15eb1617beb855fba722dc841bee6cf3403e7b5782c5904bf92bc97d7f74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a687c6ff15b7338e64e4dd5719792ce345b1b582c3952df38b7d44dde287020a92e71f57de660d9c487016025e518fe4eb72a12fc1103ba7f7131b6fd2d34eab
|
|
7
|
+
data.tar.gz: abcfbd2f2a94c224c12315dc096a0c7c2fea335be7620e44798c3a2f584872eac47543f6b647b2679052d0dd657e85d3f896c18205f2c00dcc9dc97b25d0bde6
|
|
@@ -156,8 +156,24 @@ module ActiveAdmin
|
|
|
156
156
|
# isolated engines don't try to resolve the controller as
|
|
157
157
|
# `<Engine>::ActiveAdmin::Devise::SessionsController` from
|
|
158
158
|
# the relative string form.
|
|
159
|
-
get
|
|
160
|
-
|
|
159
|
+
get login_path, to: ::ActiveAdmin::Devise::SessionsController.action(:new), as: :"new_#{scope_name}_session"
|
|
160
|
+
|
|
161
|
+
# Mirror what AA's own Devise integration does in
|
|
162
|
+
# lib/active_admin/devise.rb: accept whichever HTTP
|
|
163
|
+
# methods Devise.sign_out_via and
|
|
164
|
+
# ActiveAdmin.application.logout_link_method combine to.
|
|
165
|
+
# Read at route-draw time (not in the enclosing
|
|
166
|
+
# after_initialize) so `Rails.application.reload_routes!`
|
|
167
|
+
# picks up host changes to either value — useful for
|
|
168
|
+
# specs that stub the setting and re-evaluate routes.
|
|
169
|
+
# AA 4 dropped `logout_link_method` (its layout uses
|
|
170
|
+
# `button_to` + Turbo), so only consult the setting when
|
|
171
|
+
# the version still exposes it.
|
|
172
|
+
aa_app = ::ActiveAdmin.application
|
|
173
|
+
aa_method = aa_app.logout_link_method if aa_app.respond_to?(:logout_link_method)
|
|
174
|
+
logout_via = [*::Devise.sign_out_via, aa_method].compact.uniq
|
|
175
|
+
|
|
176
|
+
match logout_path, to: ::ActiveAdmin::Devise::SessionsController.action(:destroy), as: :"destroy_#{scope_name}_session", via: logout_via
|
|
161
177
|
end
|
|
162
178
|
end
|
|
163
179
|
end
|