Hi, Im using Next JS frontend Prebuilt UI, fastify...
# support-questions-legacy
s
Hi, Im using Next JS frontend Prebuilt UI, fastify backend Facing issue with Supertoken auth email verification on clicking mail verify button in mail, its showing same page to send verification mail api response is, {"status":"OK","isVerified":false} could anyone please give suggestion to fix it. Thanks
r
hey @sreerajmelath what's the path of the URL loaded when you click on the button from the email? (including the query params on the path)
r
right. And this loads which screen? Can you show a screenshot?
s
r
can i see the network tab when you click on this link?
s
r
whats the http status code for the verify-email?token=... network call?
s
r
@porcellus can help here
p
hi, could you show the config passed to supertokens.init on the backend?
s
p
hmm, and does you verifyEmailPOST override get called?
can you also show the frontend config?
actually it may be quicker if I could take a look at your code directly, is there a way I could check it out? sending me a zip or creating a quick repo or something would work.
j
@porcellus I work with @sreerajmelath and I have shared the repo with you in DM. There is also another issue, when clicking the Signup button the "Verify your email address" ui appears only after a page refresh.
and the verifyEmailPOST is not getting called.
p
thanks, I'll check it out later today (or tomorrow morning at the latest)
I can see two problems: - You are showing our prebuilt UI in 2 different routes and forgot to add
EmailVerification
to one of them. I'd recommend removing of those. - Adding the prebuilt UI within a
useEffect
with an empty dependency array (how it's done in your code) only works in a component that gets remounted when the path changes (since the dependency array is empty). The tutorial recommends you to do this in
auth/[[...path]]
where this is true, but it doesn't work in
_app
. Seeing those two issues I'd remove the prebuilt UI from
_app
. The alternative is remove
auth/[[...path]]
and adding
appProps.router.asPath
to the dependency array of the
useEffect
where you add the routing component.
j
That fixed the issue, thank you so much for your support.
r
thanks @porcellus !
4 Views