cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1599
Views
0
Helpful
0
Replies

Implement duo to meteor-angular application

metmirr
Level 1
Level 1

Hi Everyone,

I am trying to implement to duo to my application but I am still not able to do that. It has been a week that I am trşng and looking for resources to help me but I couldnt find. Only I found this Meteor js Tutorial Integrate duo, I am following this tutorial but not success yet.

I add duo to my app as follows:

$ meteor npm install --save duo_web

usage

//server/methods.ts
import Duo from 'duo_web';
Meteor.methods({
  duoSignReq: function() {
    let request_sig = Duo.sign_request(IKEY, SKEY, AKEY, "someone");
    return request_sig;
  }
}
//client/imports/duo/duo.component.ts
export class DuoComponent implements OnInit {
    ngOnInit() {
            Meteor.call('duoSignReq', (err, res) => {
              if (err) {
                console.log('err in duoSignReq callback', err); // I got this error
              }
              if (res) {
                console.log('reponse: ' + res);
                Duo.init({
                  host: 'my■■■■■■■■■■■■■■■■■■■',
                  sig_request: res,
                  submit_callback: this.processSubmit // I have this callback too
                });
            }
        });
}


Error:  Exception while invoking method 'duoSignReq' TypeError: Cannot read property 'sign_request' of undefined
0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links