mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-26 05:33:43 +01:00
Silence deprecation warning about secrets/credentials with Devise patch (#27578)
This commit is contained in:
parent
b264318431
commit
3107a9410c
1 changed files with 9 additions and 0 deletions
|
@ -2,6 +2,15 @@
|
||||||
|
|
||||||
require 'devise/strategies/authenticatable'
|
require 'devise/strategies/authenticatable'
|
||||||
|
|
||||||
|
# TODO: Remove this patch when this PR or similar is merged into Devise:
|
||||||
|
# https://github.com/heartcombo/devise/pull/5645
|
||||||
|
# We rely on ENV vars and not secrets/credentials, so the deprecation is just noise.
|
||||||
|
class Devise::SecretKeyFinder
|
||||||
|
def find
|
||||||
|
@application.secret_key_base
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Warden::Manager.after_set_user except: :fetch do |user, warden|
|
Warden::Manager.after_set_user except: :fetch do |user, warden|
|
||||||
session_id = warden.cookies.signed['_session_id'] || warden.raw_session['auth_id']
|
session_id = warden.cookies.signed['_session_id'] || warden.raw_session['auth_id']
|
||||||
session_id = user.activate_session(warden.request) unless user.session_activations.active?(session_id)
|
session_id = user.activate_session(warden.request) unless user.session_activations.active?(session_id)
|
||||||
|
|
Loading…
Reference in a new issue