Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Soo's avatar
Level 2

Advice on Implementing User Authentication with Laravel OR React

I'm currently developing an application using Laravel for the backend and React for the frontend. However, I'm unsure about which framework or system to use for implementing the login and registration functionality. While Laravel provides simple authentication systems like Laravel Mix.... However, I'm unfamiliar with implementing login and registration functionalities using either Laravel or React. Could someone provide guidance on how to implement user authentication using Laravel and React?

0 likes
12 replies
lilsOfi's avatar

Laravel offers a few packages for handling registration and login actually, my go-to is fortify, https://laravel.com/docs/10.x/fortify as i find it quite easy to implement and customize. Fortify will provide all the backend logic, but not the view, so is useful if you want to build your own frontend.

1 like
Soo's avatar
Level 2

@lilsOfi According to what you said i can implement an authentication system with Laravel while using React for the views simultaneously. Can you recommend one of these authentication systems: Laravel Breeze, Laravel Jetstream, or the default authentication system? I'm not familiar with the differences between them."

lilsOfi's avatar

@Soo Yes, I use it with blade and javascript so I can't see why it shoudn't work with React . As for the best package to use I suggest you to read the laravel docs about the differnt packages and choose one depending on your needs I'll link them to you Breeze https://laravel.com/docs/10.x/starter-kits#laravel-breeze Sanctum https://laravel.com/docs/10.x/sanctum JetStream https://jetstream.laravel.com/introduction.html (slightly different as provides you with a lot of stuff. I personally don't like it as i usually need to customize lots of stuff) Fortify https://laravel.com/docs/10.x/fortify

1 like
Soo's avatar
Level 2

@martinbean Do you recommend Laravel Sanctum? Do you have any tutorials to understand it?

martinbean's avatar

@Soo Why would I link to the Sanctum docs if I didn’t recommend it for your use case?

Do you have any tutorials to understand it?

Yes. The Sanctum docs that I linked you.

2 likes
puklipo's avatar

Choose your favorite starter kit.

  1. Breeze react stack
  2. Breeze API stack + Next.js
1 like
gych's avatar

Are you going to build Laravel as an API for your separate React front end? Or do you want to use Inertia and have your Laravel Backend and React front end within the same application connected as one. Based on this you can decide which starter kit to use.

Inertia helps you to:

Build single-page apps, without building an API. Create modern single-page React, Vue, and Svelte apps using classic server-side routing. Works with any backend — tuned for Laravel.

2 likes
Soo's avatar
Level 2

@gych I'm new to full stack development and React, which is why I'm not sure how to get started. I want to begin with authentication, but I've found many techniques, which is why I'm confused about where to start.

gych's avatar

@Soo Oke then first decide if you want to use React+Inertia+Laravel as one or separate React application + Laravel API

Check the introduction of inertia on https://inertiajs.com/ its an easier and faster way to combine React with Laravel. It can also be used with other js frameworks like svelte, vue and angular.

1 like

Please or to participate in this conversation.