ultimate-fastapi-tutorial icon indicating copy to clipboard operation
ultimate-fastapi-tutorial copied to clipboard

ID or Username in SUB

Open tvdsluijs opened this issue 2 years ago • 0 comments

SO, great tutorial, but I believe there is a mistake in the JWT part in https://christophergs.com/tutorials/ultimate-fastapi-tutorial-pt-10-auth-jwt/

When you create an JWT you put in the user id underneath SUB And when I go to the endpoint /me you use the same sub (with user id) to put it in username and try to search for a username that is actually a user id.

Or is there something I do not see?

tvdsluijs avatar Feb 06 '23 15:02 tvdsluijs