Hooks
useResendConfirmEmail
The following environment variables are required:
AUTH_RESEND_VERIFICATION_EMAIL='auth/verification-email'How to use?
Import
useResendConfirmEmail:
import {useResendConfirmEmail} from 'LinkerStudio/modules/authentication/common/hooks';Add this code block:
const [resendEmail, isLoadingResendEmail] = useResendConfirmEmail();How to send confirm email?
Use the
UserServicefunction, and invokeresendVerificationEmailfromLinkerStudio/modules/authentication/common/services/auth/AuthServiceto send email confirm:
import UserService from 'LinkerStudio/modules/authentication/common/services/auth/AuthService';
const resendEmail = async () => {
try {
await UserService.resendVerificationEmail();
} catch (error) {
return error
}
}Last updated
Was this helpful?