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