One effective solution for your scenario would be to utilize localStorage. Prior to redirecting to another URL, you will need to store a key:value pair in localStorage as shown below:
AppComponent {
public redirectToSecondApp() {
localStorage.setItem('jwt', 'fgsdlkfgjwerg...2345234');
this.redirectTo(this.url);
}
}
Subsequently, upon the startup of the second application, you can retrieve this key:value pair like so:
SecondAppComponent {
constructor() {
const jwt = localStorage.getItem('jwt');
}
}
Alternatively, you can also consider using query parameters along with activatedRoute in the second app (where query params are set in the first app and accessed using activatedRoute in the second).
(While utilizing session-based authentication might pose some challenges, the concept of localStorage should provide a good starting point. Best of luck!)