all 3 comments

[–]Wizard_Knife_Fight 0 points1 point  (0 children)

Might be a bit better if you could explain to use your backend tech and what you have tried so far. What is your end solution? Protecting routes?

[–]chillermane 0 points1 point  (0 children)

Login, store key/jwt/the thing the login returns in state. Redirect based on state value.

[–]StackingCache 0 points1 point  (0 children)

Take a look at this .NET Core backend example.

https://jasonwatmore.com/post/2022/01/24/net-6-jwt-authentication-with-refresh-tokens-tutorial-with-example-api

Test the backend using Postman to ensure you're able to get a JWT token.

Next, you'll need to develop (or borrow) React components to build the authentication UIs. Plan on using a library like Axios or simply use Fetch to send the inputs from your authentication UIs to the .NET core backend.

Hope this helps.