JavaScript Edu Resources. Angular Courses. React Tutorials. Join us!

Angular 2 OAuth2 OIDC from Manfred Steyer

  • The settings in the next sample point to an OAuth2/OIDC Auth Server that is available online an can be used for testing:

    The method checks, whether the app has got security tokens via the hash-fragment of the URL.

  • It parses those tokens and extracts information of the current user.
  • For this, it calls a web api, that checks its signature:

    To redirect the user to the login-form of the Auth Server, the app has only to call the method that is provided by the .

  • The template of this component binds to those properties:

    To keep unauthorized users away from some routes the application can use guards.

  • This property does not directly point to the guards to use but to tokens that can be used to request the guards via DI:

    In the current case, the guard is used as its token as well.



Angular Schulung, Workshop und Beratung in Deutschland, Österreich und der Schweiz

Comments are closed, but trackbacks and pingbacks are open.