Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an email verification system #38

Open
jeffw16 opened this issue Nov 26, 2015 · 2 comments
Open

Create an email verification system #38

jeffw16 opened this issue Nov 26, 2015 · 2 comments

Comments

@jeffw16
Copy link
Collaborator

jeffw16 commented Nov 26, 2015

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/

@jeffw16
Copy link
Collaborator Author

jeffw16 commented Nov 26, 2015

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.

@jeffw16
Copy link
Collaborator Author

jeffw16 commented Nov 26, 2015

Comment by justinpotts
Wednesday Jun 17, 2015 at 04:32 GMT


@jeffw16 Sure thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant