vue.jsfeathersjsemail-verificationfeathers-authentication

How to reset isVerified email verification feathers js


I have a feathers.js app the also uses vue for the frontend. Also using feather-authentication-management. Using mongodb that creates the isVerified and sets it to false. Trying to find out correct way to change isVerified to true when the user returns with the token.


Solution

  • It's handled when you call a verifySignup call with the token e.g. if you use the verifySignupLong action with the verification code, assuming it's valid and not expired, the verifier will set isVerified to true.

    Per the docs (under "Hooks") they don't send the initial sign-up verification request. On an after/create hook you can access the verification code (user.verifyToken) and send it to the user (how you do this is up to you - as part of a link, or as a code they have to paste in, etc.) Then if the user is not verified (isVerified is false) you capture that information, call verifySignupLong with the token, and then see if they are verified.

    We build a link that includes the email address and verify token, and send that in an email to the user, which they click and the server unpacks that query string and makes the appropriate call to authManagement.