title: What does sign_in of devise do
body: <p>I am making rails api authentication using devise but could not understand properly what sign_in of devise is doing for us. </p>
  
  <p>I have session controller with create method for sign in a user.</p>
  
  <pre><code>def create 
   user_email = params[:session][:email]
   user_password = params[:session][:password]
   user = user_email.present? &amp;&amp; User.find_by(email: user_email)
   if user.valid_password?(user_password)
     sign_in user, store: false   /* exactly this line */
     render json: user, status: 200, location: [:api, user]
   else
     render json: { errors: "Invalid email or password" }, status: 422
   end
  end
  </code></pre>
  
  <p>On rubydoc its description is written like this </p>
  
  <blockquote>
    <p>Sign in a user that already was authenticated. This helper is useful for logging users in after sign up. All options given to sign_in is passed forward to the set_user method in warden. </p>
  </blockquote>
  
  <p>But it is not clear to me. Thanks.</p>