pallets-eco / flask-jwt

JWT (JSON Web Tokens) for Flask applications
MIT License
564 stars 178 forks source link

Allow fallback to 'id' key #78

Open jobevers opened 8 years ago

jobevers commented 8 years ago

If identity is a dictionary, identity = getattr(identity, 'id') or identity['id'] fails with AttributeError: 'dict' object has no attribute 'id'

Setting the default allows the id key to be used.

pall-valmundsson commented 8 years ago

Same as #63

ghost commented 7 years ago

I second this