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