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

mayanavsel's avatar

is it possible to redirect from react login form to laravel admin panel

I have two projects. The first one is in React(static pages) and the other is in Laravel. As per my new requirement, I want to use the same Laravel admin panel for the React project. I am planning to add a login form to my React project and connect with my Laravel Sanctum by using already existing project. After this login process from the react project is it possible to redirect to the existing Laravel admin panel from the react project passing session from the react login action?

or i need to recreate all admin pages in React itself and load data by rest API into react admin panel. Thanks in Advance!

0 likes
4 replies
martinbean's avatar

@mayanavsel Why not just have the login page in your Laravel app if it’s to log into the Laravel-based admin panel?

1 like
mayanavsel's avatar

@martinbean that means just use the laravel admin panel login page.Ok.let me do that.I would like to know is there anyway to pass session from one project to another and do the login process from backend.Thanks You for the reply

martinbean's avatar

I would like to know is there anyway to pass session from one project to another and do the login process from backend.

@mayanavsel Again, why? What’s the point? If the user is logged in to an admin panel in your Laravel app, then just use a Laravel-hosted login page.

Please or to participate in this conversation.