I
I
Islam Ibakaev2020-12-16 00:00:16
Laravel
Islam Ibakaev, 2020-12-16 00:00:16

What is the preferred laravel spa authentication system?

I found two players: jwt-auth and sanctum. I know that there is another passport, but this is a different weight category. So, choosing between the first two, who do you prefer and why? Please only answer if you have used both tools and can compare.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlenko, 2020-12-16
@RichyNix

Depends on specific tasks.
If you need a token as a session mechanism for spa, sanctum will do.
If you will work with jwt token (read data from it, decrypt it, check hash, etc.), then jwt.
I use sanctum more often, in most cases it is enough.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question