Return a more useful object (insecure for now)

This commit is contained in:
Logan Cusano
2025-05-25 20:20:38 -04:00
parent 2740abfdcb
commit 3188a10a74

View File

@@ -89,7 +89,7 @@ async def login_user():
abort(401, "Invalid credentials")
access_token = create_access_token(identity={"id": user._id, "username": user.username})
return jsonify(access_token=access_token), 200
return jsonify({"access_token": access_token, "role": user.role, "username": user.username, "user_id": user._id }), 200
@auth_bp.route('/generate_api_key', methods=['POST'])
@jwt_required