Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

David Sampimon
David Sampimon
12,026 Points

JSONWebSignatureSerializer depricated from itsdangerous, use auth-lib instead

Course: https://teamtreehouse.com/library/flask-rest-api/api-protection/generating-tokens

I am following along with this course (in May 2022), however 'itsdangerous' no longer has the JSONWebSignatureSerializer. If you look into the docs it mentions:

Warning Deprecated since version 2.0: ItsDangerous will no longer support JWS in version 2.1. Use a dedicated JWS/JWT library such as authlib.

So now, I am diving into the docs of authlib, but makes the course a lot harder to understand. Any advice on how to proceed?

2 Answers

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 28,716 Points

It's very cool you are thinking "around" the course and what sorts of things you'll apply to your future work.

I wouldn't spend a whole lot of time looking through the documentation of authlib until you really need it.

You're going to need JWT to do any serious web programming, but you should avoid writing authentication from scratch. Mostly, you will use "cookbook" approaches to exchanging tokens (and reading vendor documentation and tutorials as well as scanning StackOverflow can be a big help).

I hope this helps!

David Sampimon
David Sampimon
12,026 Points

Thanks Jeff, for now I decided to focus on the building 'a social network in flask' course and maybe revisit this course once I am more comfortable with the material.