Resend Activation Email
Learn how to resend an account activation and verification email when the initial one expires.
We'll cover the following...
We'll cover the following...
Resend email serializer
The verification email is sent to the user the moment they are registered on our site. However, the access token in that email might expire before the user has verified their email. For that reason, let’s build an endpoint that users can call whenever they need a new verification email.
We can start by updating serializers.py to add ResendVerificationEmailSerializer.
class ResendVerificationEmailSerializer(serializers.ModelSerializer):class Meta:model = Userfields = ['email']
The serializer above maps the email field from the User model with the help of the ModelSerializer class. ...