Giter VIP home page Giter VIP logo

Comments (3)

danielzeljko avatar danielzeljko commented on June 9, 2024 1

Great question. Email addresses get stored in the EmailAddress table under two* conditions:

  1. When a user registers through the Allauth registration form
  2. When a user attempts to log in

Users created before migrating the codebase bypassed these steps. THis also happens if you were to create superuser accounts using the following command:

python manage.py createsuperuser

If you check the EmailAddress table with the following shell commands:

from allauth.account.models import EmailAddress
EmailAddress.objects.all()

You'll notice that these manually created users won't have corresponding entries in the EmailAddress table. Then if you try to log in, you will notice that it will send a confirmation email and that email will be present in this table. So you will need to programmatically add the emails to the EmailAddress table if they do not exist.

*These are my observations without digging into the allauth source code

from server.

keyxcode avatar keyxcode commented on June 9, 2024

I would love to try tackling this one!

from server.

keyxcode avatar keyxcode commented on June 9, 2024

Hi @danielzeljko I realized there was an issue with the script but after reading your comment I still couldn't quite understand what needs to be done. The way I see it, user email addresses are already in the EmailAddress table so I don't get why an adding step is necessary here. Could you please elaborate? Thanks a lot!

this command is not programmatically adding emails to the EmailAddress table. It's only setting the verified flag for already existing email addresses.

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.