Skip to content

Instantly share code, notes, and snippets.

Created September 16, 2012 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3731115 to your computer and use it in GitHub Desktop.
Save anonymous/3731115 to your computer and use it in GitHub Desktop.
Fix for returning values that are serializable to json
--- a/flask_login.py
+++ b/flask_login.py
@@ -133,7 +133,7 @@ def _create_identifier():
request.headers.get("User-Agent")), 'utf8', errors='replace')
hsh = md5()
hsh.update(base.encode("utf8"))
- return hsh.digest()
+ return hsh.hexdigest()
#: The default name of the "remember me" cookie (``remember_token``)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment