0

I have the following case: I have two restfull api built in asp.net Core, one specific for user authentication and the other that performs operations, to say the least, student enrollment. The idea I have is that each api is consumed by a different site, that is, a api is consumed by a React site that manages users and the other by another site that performs registration operations.

So when a user authenticates, the intention is for the React site to create a authentication cookie that can be shared with the license plate site. Currently I know how to do it with MVC.net Core, since .net has a configuration mechanism to share cookies between various applications.

But I would like to do this with React, is there a way to do it safely? I thank you for your great help!

Jairo
  • 1
  • you might find this question useful: https://stackoverflow.com/questions/5671451/creating-a-javascript-cookie-on-a-domain-and-reading-it-across-sub-domains – lucasreta Feb 19 '21 at 21:28
  • Does this answer your question? [Creating a JavaScript cookie on a domain and reading it across sub domains](https://stackoverflow.com/questions/5671451/creating-a-javascript-cookie-on-a-domain-and-reading-it-across-sub-domains) – lucasreta Feb 19 '21 at 21:29
  • Thank you very much lucasreta, in large part, what I would be missing to know how to protect my cookie on the client side, because I understand that when a cookie is created on the server it can be configured so that it is not accessed on the client, HttpOnly = true. But in this case, since the site would only be built on the client side, then they are created in that environment. – Jairo Feb 21 '21 at 16:30

0 Answers0