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?
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.
@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."
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.
@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.
@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.