https://supertokens.com/ logo
Title
p

PitchAsh

02/17/2023, 3:44 PM
im trying to setup email / password login flows with email verification.
EmailPassword.init(),
   EmailVerification.init({
       mode: 'REQUIRED'
   
}),
Im pretty sure recipes are required? I just have the default setup, login works but I do not see to get any verification links
r

rp

02/17/2023, 4:50 PM
hey @PitchAsh So the required mode essentially makes it so that using the getSession / verifySession on the backend checks the claims in the session to make sure that the email is verified.
To actually send the email verification email, you will need to call the API from the frontend - see our docs for this in the "your own UI section"
p

PitchAsh

02/17/2023, 4:52 PM
ok, i wanted to test with curl..
r

rp

02/17/2023, 4:52 PM
See our API spec here: supertokens.com/docs/fdi
you can add the cookie access token in the request header when calling the email verification API
p

PitchAsh

02/17/2023, 4:57 PM
how can we change the error message so its more friendly?
r

rp

02/17/2023, 5:01 PM
I think the backend has an onInvalidClaim errorHandler in session.init that you can provide.
p

PitchAsh

02/17/2023, 5:03 PM
ok thanks.. i will take a look