HOW-TO: embedding Cisco DUO into angular

This repo shows a possible way to include Cisco DUO into angular's component.

Key elements are:

  • Cisco DUO library loaded dynamically in component's
  • Get sign_response programmatically

Test this project on your machine

Follow these instructions:

git clone https://github.com/abuzzi-cisco/angular-duo.git
cd angular-duo
npm install
ng serve

Please remember to fill valid host & sig_request within the Duo.init initialization.

These can be found inside src/app/login-duo/login-duo.component.ts file

    host: "api-0c827f40.duosecurity.com",
    sig_request: "TX|YWJXXXX....",

The sign_request should come from API toward backend.

Final results

This project outcome will allow you to embed Cisco DUO inside angular's component:




Please note you will get an Access denied message due to invalid sig_request:


View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.