Is it possible to create a session from within rails console?
I got here from the Postal-project. We're running a pretty decent Postal environment in my organization, with a few hundred organizations, and something we would like to have is being able to auto-login users (without a username and password).
What we'd like to do is create a session automagically from within the rails console, and then set the appropriate cookie in the visitor's web browser.
I've put a bit of time (not too much though) into trying to create a session, but I get the following error:
/usr/local/bundle/gems/actionpack-7.0.8.1/lib/action_controller/metal/cookies.rb:15:in `cookies': undefined method `cookie_jar' for nil:NilClass (NoMethodError)
(User.authenticate works fine, it's create_auth_session that fails)
I'm guessing that Rails knows I'm not using a web browser.
So, my question is, would it even be possible to create a session in such a way with Authie? I wouldn't mind putting in some work that could perhaps end up as a useful PR, but I'd need a push in the right direction :)