Which UI do you use?
Custom UI
Pre built UI
Changing email / SMS resend time interval
caution
This limit is only enforced on the client-side. For API rate-limiting please check out the Advanced customizations section.
You can set resendEmailOrSMSGapInSeconds
to establish a minimum delay before the frontend allows the user to click the "Resend" button.
- ReactJS
- Angular
- Vue
// this goes in the auth route config of your frontend app (once the pre built UI script has been loaded)
(window as any).supertokensUIInit("supertokensui", {
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
recipeList: [
(window as any).supertokensUIPasswordless.init({
contactMethod: "EMAIL_OR_PHONE", // This example will work with any contactMethod.
signInUpFeature: {
// The default value is 15 seconds
resendEmailOrSMSGapInSeconds: 60,
}
}),
(window as any).supertokensUISession.init({ /* ... */ })
]
});
import SuperTokens from "supertokens-auth-react";
import Passwordless from "supertokens-auth-react/recipe/passwordless";
import Session from "supertokens-auth-react/recipe/session";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
recipeList: [
Passwordless.init({
contactMethod: "EMAIL_OR_PHONE", // This example will work with any contactMethod.
signInUpFeature: {
// The default value is 15 seconds
resendEmailOrSMSGapInSeconds: 60,
}
}),
Session.init({ /* ... */ })
]
});
// this goes in the auth route config of your frontend app (once the pre built UI script has been loaded)
(window as any).supertokensUIInit("supertokensui", {
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
recipeList: [
(window as any).supertokensUIPasswordless.init({
contactMethod: "EMAIL_OR_PHONE", // This example will work with any contactMethod.
signInUpFeature: {
// The default value is 15 seconds
resendEmailOrSMSGapInSeconds: 60,
}
}),
(window as any).supertokensUISession.init({ /* ... */ })
]
});