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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12acbb45f9bb446114545d4634dfeac08880038ad2860e95e61c5a97a26f8fda
4
- data.tar.gz: 18c6dadbc576e60c0cc6f8ecae04d8cf8c674127f430c12b8ea33f12b7472e47
3
+ metadata.gz: 352c557fd647f3422d80408f88f874cb995d6ce588dd2265263b3d6bf0da0030
4
+ data.tar.gz: 488b15eb1617beb855fba722dc841bee6cf3403e7b5782c5904bf92bc97d7f74
5
5
  SHA512:
6
- metadata.gz: 0f4a8f41ac39006e4c0882b55fc481f1bee795290655c71e79a56a219425145a7f977f60ec4e72d2e0a317b765688dd41478c48c208f49104f85dd024c5273d9
7
- data.tar.gz: 0e017cf647f5fbea240074c247bc7baac89c81222d7a94d2a0387364a3d7ef08468d5cef1e183c375291f56fc4d6105b316c78076cc82beee75a04b4ee7c651e
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 login_path, to: ::ActiveAdmin::Devise::SessionsController.action(:new), as: :"new_#{scope_name}_session"
160
- delete logout_path, to: ::ActiveAdmin::Devise::SessionsController.action(:destroy), as: :"destroy_#{scope_name}_session"
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveAdmin
4
4
  module Oidc
5
- VERSION = "2.1.2"
5
+ VERSION = "2.1.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-oidc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Fedoronchuk