Your register view is setting is_active to True - regardless of email
verification.

Remember that the email confirmation will happen asynchronously to the
registration.

What I do is have a separate table that records that a user needs to
complete the verification process.
So registration sends the email (with a link) to the user and adds a record
to the verification pending table.

I then have the verification view which sets the user to be Active and
deleted the record in the pending table.



On Mon, May 13, 2024 at 1:27 PM Kennedy Akogo <akogokenn...@gmail.com>
wrote:

> I'm attempting to implement a registration system with email verification.
> While the email verification functionality is working - sending an email to
> the user for verification - I'm encountering an issue where users are able
> to log in even without verifying their email addresses.
>
> My goal is to restrict login functionality for users who haven't verified
> their email addresses. In other words, users should only be able to log in
> if they have completed the email verification process.
>
> Please advise ,I have attached images of the login and register view
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJBDwusqGZXgHHg55uOvh_9h1VB8D3o1pxfLPcaJTJHViXrwZg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJBDwusqGZXgHHg55uOvh_9h1VB8D3o1pxfLPcaJTJHViXrwZg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN0Bb7eQQ76s_VL2z%2BSc%3DEfHH%3DxqRePsp9Ph8teC2KN2ZqjF2w%40mail.gmail.com.

Reply via email to