https://supertokens.com/ logo
#support-questions
Title
# support-questions
r

rp

04/26/2021, 4:14 AM
so it should become:
Copy code
const createSession = async (res, userId) => {
  await Session.createNewSession(res, userId);
}

const signIn = (req, res) => {
  ...
  .signIn(email, password)
  .then(async (u) => {
     try {
       await createNewSession(res, u.id);
       res.json(u)
      } catch (err) {
        res.status(500).json(e)
      }
   });
}