def set_user_in_warden(scope, resource)
      scope = Devise::Mapping.find_scope!(scope)
      warden.set_user(resource, scope: scope, store: false)
    end
def set_user_in_warden(scope, resource)
      scope = Devise::Mapping.find_scope!(scope)
      warden.set_user(resource, scope: scope, store: false)
    end
extracted and simplified from Devise