S
S
Sergey Bondarenko2019-04-06 20:08:24
Flask
Sergey Bondarenko, 2019-04-06 20:08:24

Routing logged in users and guests to RactJS (SPA) and Flask?

Hello, today I ran into a problem, I needed to create a registration and login form, well, I sort of did it, but here's how to separate logged in users and guests, for example, if the user is logged into the site, then do not route the login page, or display its place something something else, can it be somehow implemented using SPA React? Because my boiler does not stoker, I turn to you, mayday, mayday! (I hope I explained clearly)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-04-06
@lietryit

1. When loading the application, we check the presence of a token in the cookie.
2. If it is, then load the user.
3. If not, show the version for unlogged users.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question