Reputation: 718
I implement authentication for my API service and consider Laravel 5.2 token-based authentication for this. Is there any reasons to use Json Web Tokens instead? Is it actually comparable? I found tymondesigns/jwt-auth package and some tutorials about it. But since Laravel 5.2 supports token authentication natively what is the purpose of this package?
Upvotes: 12
Views: 1732
Reputation: 1618
Laravel 5.2 ships with token-based authentication that checks all requests made, look for the token, and validates them against a custom token column in the users table. That's all there is to it.
The JWT-auth package has more to it:
Upvotes: 11