React native email verification
# support-questions
e
Hey, @rp got issue with mobile singup, verification email is not send, on the backend of my app I have EmailVerification in required mode, on web version email is being sent, but it doesn't work with react native, according to docs, there is no any specifications in react native code, it should work properly, am I missing something?
r
Hey. You need to call the api to send the email verification yourself in react native.
e
So i need to send request to route like http://localhost:8080/api/user/email/verify along with users signup data?
r
Not the user sign up data. Just the session tokens (which our react native SDK should add on its own)
e
Unfortunately it doesn't, resolved this with manually sent request to http://localhost:8080/api/user/email/verify/token and headers, like shown here https://supertokens.com/docs/thirdparty/custom-ui/enable-email-verification in step 5, so I guess maybe docs needs some info on this bug, cause I use react native sdk, but it doens't seem to work properly
r
What’s the value of apiDomain that you have set on the frontend?
The frontend SDK should add the session tokens in the request
e
apiDomain is set to http://localhost:8080 without slash at the end and apiBasePath is set to /api
r
And are you using axios or fetch to make api calls?
If using axios, you need to add the axios interceptor to your axios instance.
e
I use rtk query, which interceptor I need to add?
r
i think rtk uses fetch underneath? If so, the interception should be applied on its own
or does it use axios underneath?
e
It uses axios
r
ok. So then we don't yet support that for react native unfortunately.
So what you may want to do is to get the access token on the frontend using Session.getAccessToken and add it to the auth header in the request yourself. This should work too
e
I'we managed to solve this using send email route, right after I get response from singup method)
r
yea
2 Views