In this series, we will add Laravel Fortify features to the SPA that uses Laravel Sanctum for authentication without using Laravel Jetstream. Laravel Fortify is a headless authentication system for Laravel. It does not care what front-end you choose, instead, it gives you the flexibility to use whatever front-end you want. You are able to specify which views to render for specific actions, but what about SPA or API? SPAs don’t have blade views, it has client-side routing. It may seem a difficult task at first but Laravel Fortify makes this very easy & that is what we cover in this series. We’ll be authenticating SPA using Laravel Fortify without Laravel Jetstream. We will also use LaraveL Sanctum to authenticate the SPA.

Note that this video uses the same demo project that was created & covered in the previous video with Laravel Sanctum, if you don’t know how to authenticate your SPA with Laravel Sanctum I suggest you watch that video first:

🤝 You can support me by giving my videos a 👍 & by subscribing to the channel ✔️

— Note —
At the time of recording these videos, there was no formal documentation on Laravel Fortify. Now there are docs on the Laravel docs page. Also, there was no way to disable the views by using the configuration, it was added later.

So instead of defining your own routes, you can set the ‘view’ to false & set the ‘prefix’ to ‘api’ in the fortify config file & then you can remove the routes from the api.php routes file & just use the built-in routes. This makes api.php cleaner since you don’t have to define the routes yourself.

I made a quick video at the end of the series explaining the change & made necessary improvements to the routes, you can check that video here: so you should still complete this series & make sure to watch that last video as well

Read also >>  Laravel Queries: Group AND-OR Conditions to Avoid Errors

—- Source Code —-
Back-End (Laravel):
Front-End (Next.JS):

— Laravel Fortify Without Jetstream Series —
Laravel Fortify Without Jetstream Feature –
Add Two-Factor Authentication Feature –
Add User Registration Feature –
Add Account Profile & Password Updates Feature –
Add Password Reset Feature –
Authenticate Mobile App With Fortify & Sanctum –
Updates to Laravel Fortify –



Please enter your comment!
Please enter your name here