class Macros::Auth::ExpireSessionData

Expire session data Macro is used in other Devise' related macros because of the bug github.com/plataformatec/devise/blob/master/lib/devise/controllers/sign_in_out.rb#L108

@example

step Macros::Auth::ExpireSessionData()

Public Class Methods

new() click to toggle source

@return [Macros::Auth::ExpireSessionData] step macro instance

# File lib/macros/auth/expire_session_data.rb, line 14
def initialize; end

Public Instance Methods

call(ctx, **) click to toggle source

@param ctx [Trailblazer::Skill] tbl context hash

# File lib/macros/auth/expire_session_data.rb, line 17
def call(ctx, **)
  session = ctx[:warden].session_serializer.session

  session.empty?
  session.keys.grep(/^devise\./).each { |k| session.delete(k) }
end