I’m a beginner to rails and I’m having trouble with signing users in when they click on the registration email. I’m calling a login method (sign_in) and then directing them to the a page in the site, but the logic does not work. I am using Sorcery for generating the activation email. My repo is Here. I would appreciate any help, I’m a beginner still learning. Thanks in advance.
Share
There’s nothing magical about the email — well, okay, it’s probably got a capability tacked onto the end of an URL that lets you know the email address exists long enough to receive one email — but once they sign in using your login method, it should store a cookie in the browser with a reference to the session id. (Or store session data directly in the cookie… up to you.)
So long as the same browser is used from the email clicking to the normal site use, the cookie (and its reference to the session id or session data) should still be valid, and they should still be “logged in”.