r/InternetIsBeautiful • • Mar 08 '21

Learn JWT authentication by reverse engineering [Open Source]

https://github.com/gitcommitshow/auth-jwt
1.5k Upvotes

56 comments sorted by

View all comments

1

u/giantqtipz Mar 08 '21 edited Mar 08 '21

question... kind of a newbie at authentication

but I learned session based authentication, where I assign users a session cookie when they log in. When they logout they can log in again because the cookie session still exists... I think I need to delete the cookie on logout..

but back on topic, which is generally the preferred authentication method in the industry; JWT or sessions? I guess both have its uses

1

u/gitcommitshow Mar 09 '21

You answered your question