mirror of
https://github.com/wassname/flask-security.git
synced 2026-07-10 00:30:24 +08:00
Fix #45
This commit is contained in:
@@ -53,7 +53,7 @@ def generate_confirmation_token(user):
|
||||
|
||||
:param user: The user to work with
|
||||
"""
|
||||
data = [user.id, md5(user.email)]
|
||||
data = [str(user.id), md5(user.email)]
|
||||
return _security.confirm_serializer.dumps(data)
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ def generate_login_token(user):
|
||||
|
||||
:param user: The user the token belongs to
|
||||
"""
|
||||
return _security.login_serializer.dumps([user.id])
|
||||
return _security.login_serializer.dumps([str(user.id)])
|
||||
|
||||
|
||||
def login_token_status(token):
|
||||
|
||||
@@ -54,7 +54,7 @@ def generate_reset_password_token(user):
|
||||
|
||||
:param user: The user to work with
|
||||
"""
|
||||
data = [user.id, md5(user.password)]
|
||||
data = [str(user.id), md5(user.password)]
|
||||
return _security.reset_serializer.dumps(data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user