Fix linting in connectors (#1293)
This commit is contained in:
parent
57031e7752
commit
40c37143e0
|
@ -13,7 +13,7 @@ document.addEventListener('DOMContentLoaded', event => {
|
||||||
const hostParam = getQsParam('host');
|
const hostParam = getQsParam('host');
|
||||||
const requestParam = getQsParam('request');
|
const requestParam = getQsParam('request');
|
||||||
|
|
||||||
var hostUrl = new URL('https://' + hostParam);
|
const hostUrl = new URL('https://' + hostParam);
|
||||||
if (!hostUrl.hostname.endsWith('.duosecurity.com') && !hostUrl.hostname.endsWith('.duofederal.com')) {
|
if (!hostUrl.hostname.endsWith('.duosecurity.com') && !hostUrl.hostname.endsWith('.duofederal.com')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,9 @@ function initiateBrowserSso(code: string, state: string) {
|
||||||
window.postMessage({ command: 'authResult', code: code, state: state }, '*');
|
window.postMessage({ command: 'authResult', code: code, state: state }, '*');
|
||||||
const handOffMessage = ('; ' + document.cookie).split('; ssoHandOffMessage=').pop().split(';').shift();
|
const handOffMessage = ('; ' + document.cookie).split('; ssoHandOffMessage=').pop().split(';').shift();
|
||||||
document.cookie = 'ssoHandOffMessage=;SameSite=strict;max-age=0';
|
document.cookie = 'ssoHandOffMessage=;SameSite=strict;max-age=0';
|
||||||
let content = document.getElementById('content');
|
const content = document.getElementById('content');
|
||||||
content.innerHTML = '';
|
content.innerHTML = '';
|
||||||
let p = document.createElement('p');
|
const p = document.createElement('p');
|
||||||
p.innerText = handOffMessage;
|
p.innerText = handOffMessage;
|
||||||
content.appendChild(p);
|
content.appendChild(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ import { buildDataString, parseWebauthnJson } from './common-webauthn';
|
||||||
// tslint:disable-next-line
|
// tslint:disable-next-line
|
||||||
require('./webauthn.scss');
|
require('./webauthn.scss');
|
||||||
|
|
||||||
|
const mobileCallbackUri = 'bitwarden://webauthn-callback';
|
||||||
|
|
||||||
let parsed = false;
|
let parsed = false;
|
||||||
let webauthnJson: any;
|
let webauthnJson: any;
|
||||||
let headerText: string = null;
|
let headerText: string = null;
|
||||||
|
@ -12,7 +14,6 @@ let btnReturnText: string = null;
|
||||||
let parentUrl: string = null;
|
let parentUrl: string = null;
|
||||||
let parentOrigin: string = null;
|
let parentOrigin: string = null;
|
||||||
let mobileResponse = false;
|
let mobileResponse = false;
|
||||||
let mobileCallbackUri = 'bitwarden://webauthn-callback';
|
|
||||||
let stopWebAuthn = false;
|
let stopWebAuthn = false;
|
||||||
let sentSuccess = false;
|
let sentSuccess = false;
|
||||||
let obj: any = null;
|
let obj: any = null;
|
||||||
|
@ -82,7 +83,7 @@ function parseParametersV2() {
|
||||||
btnText: string;
|
btnText: string;
|
||||||
btnReturnText: string;
|
btnReturnText: string;
|
||||||
callbackUri?: string;
|
callbackUri?: string;
|
||||||
mobile?: boolean
|
mobile?: boolean
|
||||||
} = null;
|
} = null;
|
||||||
try {
|
try {
|
||||||
dataObj = JSON.parse(b64Decode(getQsParam('data')));
|
dataObj = JSON.parse(b64Decode(getQsParam('data')));
|
||||||
|
|
Loading…
Reference in New Issue