Answer the question
In order to leave comments, you need to log in
How to do registration/authorization in React?
Hello!
Can you suggest which way to dig? You need to implement registration / authorization in React. Laravel is used on the backend. In general, how is it done?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Start with the API, I advise you to use JWT (for Laravel there is https://github.com/tymondesigns/jwt-auth )
Then you make forms and send requests via fetch / axios
The session can be stored in Redux / MobX
If you want, I can pull the implementation from the current project and put it on github as an example
There are 2 solutions. The first is to use ssr (side rendering server). The second way is much faster to write an api to which you knock on the api from react using fetch or axios (better than it) and take the necessary data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question