#JWT token vs Sanctum

10 messages · Page 1 of 1 (latest)

reef mortar
#

I wanna start with a brand new project.
My front-end is totally separated from the back-end. I am using react vite. So I am confused, which one should I use for API authentication?

sonic hedge
#

Laravel Sanctum if you wish to use Cookie session authentification, if not then jwt

reef mortar
#

Or on server only

#

Don't forget that I do not use inertia

sonic hedge
#

What do you mean? If you use Sanctum and session based authentification, you can use axios withCredentials set to true, there is a pretty good explanation in docs

reef mortar
#

I did JWT before but the package is not good

reef mortar
sonic hedge
#

Inertia doesnt use Sanctum at all, Blade is a templating language