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

mopixels

11/24/2022, 11:39 AM
Hey, I'm building a NextJS app and I have a few issues with email verification: 1. I enabled email verification, disabled defaultUI for sign in and sign up forms and the app isn't sending a verification emails. Do I have to initiate the verification email with a separate method. I was using
signUp
from
supertokens-auth-react/recipe/emailpassword
, but it doesn't send verification email. 2. I added verification page
/auth/verify-email
as recommended - https://supertokens.com/docs/emailpassword/common-customizations/email-verification/embed-in-page#step-2-render-the-component-yourself, but I get an error in this page:
Copy code
Server Error
Error: No instance of EmailVerification found. Make sure to call the EmailVerification.init method.
If you are trying to use this method doing server-side-rendering, please make sure you move this method inside a componentDidMount method or useEffect hook.
I initiated superTokens as recommended in
_app.tsx
file.
r

rp

11/24/2022, 11:40 AM
hey @mopixels
> Do I have to initiate the verification email with a separate method. You need to navigate the user to the email verification screen on our pre built UI post sign up. Or to a route that uses wrapper which will navigate to the email verificatio route on its own.
> I added verification page /auth/verify-email as recommended - You need to make sure that the react component is not being rendered on the server side on this route. You can use the nextjs' dynamic HOC to achieve this.
@mopixels
2 Views