Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return async function () {
const conf = path.format({ dir, base: `${base}.config.js` });
let { config, client, clients } = require(conf); // eslint-disable-line
if (client && !clients) {
clients = [client];
}
if (!config.findAccount) {
config.findAccount = Account.findAccount;
}
const issuerIdentifier = `${protocol}//127.0.0.1:${port}`;
const provider = new Provider(issuerIdentifier, {
clients,
jwks: global.keystore.toJWKS(true),
adapter: TestAdapter,
...config,
});
let agent;
function logout() {
const expire = new Date(0);
return async function () {
const conf = path.format({ dir, base: `${base}.config.js` });
let { config, client, clients } = require(conf); // eslint-disable-line
if (client && !clients) {
clients = [client];
}
if (!config.findAccount) {
config.findAccount = Account.findAccount;
}
const issuerIdentifier = `${protocol}//127.0.0.1:${port}`;
const provider = new Provider(issuerIdentifier, {
clients,
jwks: global.keystore.toJWKS(true),
adapter: TestAdapter,
...config,
});
let agent;
function logout() {
const expire = new Date(0);
const cookies = [