Callback redirect not preserving session

You are getting the user and collecting it to new variable @user but while you are calling the sign_in method again you did initialize the new variable user with using(eg. @user)