Merge pull request #21 from TwilioDevEd/fix-token-python-3

Create a string from bytes for Python 3
This commit is contained in:
Paul Kamp
2017-05-22 14:48:08 -07:00
committed by GitHub

2
app.py
View File

@@ -81,7 +81,7 @@ def token():
token.add_grant(chat_grant)
# Return token info as JSON
return jsonify(identity=identity, token=token.to_jwt())
return jsonify(identity=identity, token=token.to_jwt().decode('utf-8'))
# Notify - create a device binding from a POST HTTP request
@app.route('/register', methods=['POST'])