diff --git a/flaschengeist/modules/auth/__init__.py b/flaschengeist/modules/auth/__init__.py index db1ae9a..0ec7358 100644 --- a/flaschengeist/modules/auth/__init__.py +++ b/flaschengeist/modules/auth/__init__.py @@ -51,13 +51,11 @@ def _create_token(): logger.debug("user is {{ {} }}".format(user)) token = access_controller.create(user, user_agent=request.user_agent) logger.debug("access token is {{ {} }}".format(token)) - dic = user.serialize() - dic["access_token"] = token.token logger.info("User {{ {} }} success login.".format(username)) # Lets cleanup the DB access_controller.clear_expired() - return jsonify(dic) + return jsonify({"user": user, "token": token.token}) @auth_bp.route("/auth", methods=['GET'])