I am trying to figure out a way to sign a user when using Devise. I know this is possible from a controller using the following helper:
sign_in(:user, user)
Unfortunately, this helper does not work when called from a service or initializer (I have an initializer where I can identify the user from, but I want to be able to log in). Is there any way to do this outside the controller? Maybe use a warden?
source
share