Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
11
research/chatwoot/config/initializers/warden_hooks.rb
Normal file
11
research/chatwoot/config/initializers/warden_hooks.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
Warden::Manager.after_set_user do |user, auth, opts|
|
||||
scope = opts[:scope]
|
||||
auth.cookies.signed["#{scope}.id"] = user.id
|
||||
auth.cookies.signed["#{scope}.expires_at"] = 30.minutes.from_now
|
||||
end
|
||||
|
||||
Warden::Manager.before_logout do |_user, auth, opts|
|
||||
scope = opts[:scope]
|
||||
auth.cookies.signed["#{scope}.id"] = nil
|
||||
auth.cookies.signed["#{scope}.expires_at"] = nil
|
||||
end
|
||||
Reference in New Issue
Block a user