0

I am new to web development. I am trying to create multiple Angular applications, such as App1, APp2, App3. where App1 and App2 have common features, which i want to add them in the App3 instead of repeating them in both App1 and App2.

For instance the common feature is Authentication. I want to use App3 for authenticating both App1, App2. All three apps are running on different server and i am redirecting to App3 from App1 and App2 for authentication. using window.open('url', _self) After the authentication process is successful i want to redirect it to the origin App. It also works fine.

I have some information which i store in local storage during authentication. but when redirecting from one app to another using window.open('url', _self) information stored in the local storage is lost.

It will be a great help if someone can guide me a better way to store the information on user browser and access it across apps even when the redirection to other apps happen.

  • 1
    It sounds like you're looking for a [single sign-on](https://en.wikipedia.org/wiki/Single_sign-on) or potentially an [OAuth](https://en.wikipedia.org/wiki/OAuth) implementation. Regardless, you cannot (and should not) do this exclusively from the frontend. You will need to pick out a backend framework and learn how to implement these into each service. Think of the frontend as a place where anything can be seen, modified, added, deleted, etc., because that's exactly what it is. – Jesse Feb 16 '23 at 21:45

0 Answers0