https://supertokens.com/ logo
#general
Title
# general
r

rp

11/01/2020, 3:03 PM
alternatively, you can replace
Copy code
router.post(
  '/token',
  supertokens.middleware(),
  trimRequest.all,
  getRefreshToken
)
With
Copy code
app.use(supertokens.init({
    hosts: "...",
    apiKey: "...",
    refreshTokenPath: "/token"
}));
And then you no longer need the
getRefreshToken
function