Create another table "authentication" that contains, uuid, userId, expirationDate. If a user asks for a verification link, create a entry in this table for the user. The link the user receives in their email contains a link that contains the uuid also smth like: frontendUrl/auth/verifyEmail/{uuid}. The backend then provides a endpoint /api/v1/auth/verifyEmail that contains the uuid in the body. For the backend endpoint stick to the docs. The backend then checks if the uuid is valid and is not expired. If its correct, set the flag isUserVerified in the user to true and delete the entry from the authentication table
Create another table "authentication" that contains, uuid, userId, expirationDate. If a user asks for a verification link, create a entry in this table for the user. The link the user receives in their email contains a link that contains the uuid also smth like: frontendUrl/auth/verifyEmail/{uuid}. The backend then provides a endpoint /api/v1/auth/verifyEmail that contains the uuid in the body. For the backend endpoint stick to the docs. The backend then checks if the uuid is valid and is not expired. If its correct, set the flag isUserVerified in the user to true and delete the entry from the authentication table