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

michaelzhuk

04/30/2021, 1:03 PM
Here is how it's called in my api route
Copy code
supertokens.init(SuperTokensConfig.backendConfig())
  ...
  let session

  try {
    session = await getSession(req, res)
  } catch (error) {
    console.log("> INSERT ERROR", error)
    return res.status(401).json({ error: "Unauthorized" })
  }