Skip to content

Instantly share code, notes, and snippets.

View ahmedbilal's full-sized avatar

Ahmed Bilal Khalid ahmedbilal

  • 40grid
  • Lahore, Pakistan
View GitHub Profile
@seanbehan
seanbehan / flask-mailer.py
Created May 23, 2016 19:13
generate signed token for email confirmation with python and flask
from itsdangerous import URLSafeTimedSerializer
from project import app
def generate_confirmation_token(email):
serializer = URLSafeTimedSerializer(app.config['SECRET_KEY'])
return serializer.dumps(email, salt=app.config['SECURITY_PASSWORD_SALT'])