Open jeffw16 opened 8 years ago
Comment by jeffw16 Wednesday Jun 17, 2015 at 04:15 GMT
According to https://realpython.com/blog/python/handling-email-confirmation-in-flask/#add-email-confirmation, we'll need to use these imports:
token.py - generate_confirmation_token(), confirm_token()
from itsdangerous import URLSafeTimedSerializer
from project import app
users.py - register()
from project.token import generate_confirmation_token, confirm_token
import datetime
from project.email import send_email
I would appreciate if you, Justin, could do this for me. I'm not very familiar with virtualenv (I speak PHP), but the rest looks pretty doable.
Issue by justinpotts Wednesday Jun 17, 2015 at 03:44 GMT Originally opened as https://github.com/justinpotts/terml.io-retired/issues/5
Currently, we have an is_active property in the db that we use (don't use, but will), for checking if the user is active.
I would like to implement an email verification system that when verified after sign up will turn that property from False to True, enabling the rest of the website.
When user.is_active == False, the website should function as it does when logged out, only with an activation page showing instead of login when going to restricted URLs. If I'm not mistaken, we have an activationneeded.html or something similar already in /templates.
Try starting out with this tutorial on email verification. We can skip all the db stuff, we already have is_active (they use confirmed), and we don't need confirmed_on. You should be able to skip down to "Add Email Confirmation," however double check the packages they're importing; we may need to add a few.
https://realpython.com/blog/python/handling-email-confirmation-in-flask/