Serverless Optimisation
On init
function call, SuperTokens requires some initial "handshaking" information from the core, which can slow down performance for serverless API calls.
To cache this handshaking info, please set isInServerlessEnv
to true
during supertokens.init
on your backend like so:
let Supertokens = require("supertokens-node");
Supertokens.init({
supertokens: {
connectionURI: "https://try.supertokens.com",
},
appInfo: {
appName: "YOUR APP NAME",
apiDomain: "YOUR API DOMAIN",
websiteDomain: "YOUR WEBSITE DOMAIN"
},
recipeList: [...],
isInServerlessEnv: true
});