1

I have two basic questions (dont need anyone to write the code or something, just to see different directions).

When using react, react-router and redux what is the best approach to setup user authentication (using jwt)? I have researched a lot of articles and everyone uses different approach, so it becomes a bit confusing and everyone has different opinion saying other way is wrong etc...

  • What way and where is the best place to store user token and all informations related to that?
  • How to prevent user from accessing specific routes, what is best approach to do this and where exactly?

Imagine that app is ugins react, react-router for route setup and redux.

1
  • You ll get another person telling his/her opinion about your too broad question. Instead do some more research and only ask questions to clarify specific points of your problem. Commented Jan 31, 2017 at 14:04

1 Answer 1

1

Check auth wrapper - nice solution for your problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.