-2

I'm using angular to get states and setup application routes and manage access to certain pages, however as the states are loaded in the application config parts, any user can see my URI and my states even before authentication. What am looking for is a solution to load only the first login page and then if user is authenticated the application can ask the server for the rest of authorized states and URI.

Med
  • 241
  • 1
  • 6
  • 23

1 Answers1

0

Make a separate app for login, and once the user is authenticated (from back end), redirect the user to your main app from the success callback of the authentication rest call. For sharing data(logged in user data) between these apps you can use session storage.

Sachet Gupta
  • 822
  • 5
  • 18