How should I integrate online help documentation with an existing angular 5 app?

455 Views Asked by At

We have an angular 5 App with OAuth authentication and a pure html/js online help doc App generated by a documentation tool.

One of the requirement is that the online help App can only be accessed by authenticated users. However, the online help App itself does not have authentication logic now.

Basically, we would like to let users log in to the angular 5 app firstly, and then click a link in order to show the online help doc page. Moreover, if users do not login in , they cannot view the online help.

We have two proposed approaches:

  1. Host the online help app in a separate place and add authentication logic for it.

    • It is clean, because the online help is not part of the Angular app.
    • However, More code need to be implemented, such as validating access token
  2. Reuse the authentication logic implemented in the angular 5 App

    We would like to embed the online help App inside the angular 5 App, so we do not have write authentication logic for the online help app.

We are just wondering it is possible to host another html/js app inside an angular 5 app? and reuse the existing CanActive Route Guard? any suggestions are welcome.

0

There are 0 best solutions below