I've been using passport with express sessions for user authentication for a while. Now I wanna try authentication with JWT (JSON Web Token). JWT authentication with email and password seems pretty simple. But I think it gets a little complicated when JWT is used with OAuth. I just wanna ask that:
- Is it a popular practice to use JWT for OAuth?
- Which method is better, JWT or session based authentication? And please provide a link to a simple guide to use JWT for OAuth if you think JWT for OAuth is a better choice.