So, I will show how you can make a custom email verification mechanism using Django API and React as front-end. For your information, you can follow the same techniques for forgot password. Below steps need to be followed.
At first, getting front-end URL from .env file (.env file = where all constant values of the application are stored). Then, generating a token by get_random_string.
Both the front-end URL and the token combine to create the verification email link. This link is attached to the email template. Finally, the email is sent to the registered user.
In my case, the email is looked like below
Look at the link in the above image. It follows the below format.
<frontend-url>/email-verify/<random-token>
The back-end part is done till now by sending the verification email to the front-end.
Now the front-end part comes into the play.