This release changes how the `jwt.expired_token_loader` callback function works. Before this release the callback function took no arguments. Now it will take one argument which is the decoded contents of the expired token. This lets you customize the expired token callback based on the token that was received. For example:
python
Old way
jwt.expired_token_loader
def old_expired_callback():
return jsonify(foo='bar'), 401
New way
jwt.expired_token_loader
def new_expired_callback(expired_token):
if expired_token['type'] == 'access':
return jsonify(foo='bar'), 401
else:
return jsonify(foo='baz'), 401
**The old way will still work**, updating to this version will not break your software out from under you. You will however receive a deprecation warning when using that way. To fix this, simply add an addition argument to your callback function for the expired token.