@@ -0,0 +1,578 @@
+from itsdangerous import URLSafeTimedSerializer%0A%0Afrom project import app%0A%0A%0Adef generate_confirmation_token(email):%0A    serializer = URLSafeTimedSerializer(app.config%5B'SECRET_KEY'%5D)%0A    return serializer.dumps(email, salt=app.config%5B'SECURITY_PASSWORD_SALT'%5D)%0A%0A%0Adef confirm_token(token, expiration=3600):%0A    serializer = URLSafeTimedSerializer(app.config%5B'SECRET_KEY'%5D)%0A    try:%0A        email = serializer.loads(%0A            token,%0A            salt=app.config%5B'SECURITY_PASSWORD_SALT'%5D,%0A            max_age=expiration%0A        )%0A    except:%0A        return False%0A    return email%0A

Add email token for user registration