C
C
Cerebrumlab2019-01-23 14:51:34
React
Cerebrumlab, 2019-01-23 14:51:34

How to open the entered link in react after authentication?

Good afternoon
The situation is as follows. and now I ran into a problem when checking authentication if the user is not logged in, I do a redirect to the login. If the key is present in localstorage then history.push(/page). The problem arises when I want to follow an arbitrary url, for example from a letter. I am redirected to /page after checking access and I want to be redirected to /history.push to the page I went to. Please give me a hint on how to implement this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Nikolaev, 2019-01-23
@Heian

Check Url and redirect. What is the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question