Using ReactJS with Passport?

Posted 2 years ago by joshgallagher24

Hello everybody!

Now that L5.3 has been released for a couple of days, I have decided to delve into it - specifically Passport.

To make it clear, I prefer ReactJS to VueJS and want to continue using it.

What I wanted to ask is can I use Passport with a ReactJS app? I have read some of the docs, specifically 'consuming your API with Javascript' and it seems that I have to use VueJS with the 'web' routes and specifically the fresh api token middleware? However, I want to create an API with Laravel and Passport that communicates with my ReactJS app in a secure way.

Q: Is there a way that I can send the encrypted cookies to my ReactJS app whilst using the API routes? Do I have to build my react app within a blade template?

Also, anybody who has any other suggestions please state them!

Please sign in or create an account to participate in this conversation.