load DuoWebSDK as a module
This commit is contained in:
parent
d875b9aeb0
commit
4bd9a9fc11
|
@ -22,6 +22,7 @@ import { SyncService } from '../../abstractions/sync.service';
|
|||
|
||||
import { TwoFactorProviders } from '../../services/auth.service';
|
||||
|
||||
import * as DuoWebSDK from '../../misc/duo';
|
||||
import { U2f } from '../../misc/u2f';
|
||||
|
||||
export class TwoFactorComponent implements OnInit, OnDestroy {
|
||||
|
@ -120,7 +121,8 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
setTimeout(() => {
|
||||
(this.win as any).Duo.init({
|
||||
DuoWebSDK.init({
|
||||
iframe: undefined,
|
||||
host: params.Host,
|
||||
sig_request: params.Signature,
|
||||
submit_callback: async (f: HTMLFormElement) => {
|
||||
|
@ -131,7 +133,7 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}, 0);
|
||||
break;
|
||||
case TwoFactorProviderType.Email:
|
||||
this.twoFactorEmail = params.Email;
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
"moduleResolution": "node",
|
||||
"target": "ES6",
|
||||
"module": "commonjs",
|
||||
"lib": ["es5", "es6", "dom"],
|
||||
"allowJs": true,
|
||||
"sourceMap": true,
|
||||
"declaration": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
|
|
Loading…
Reference in New Issue