Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).catch((error) => {
reject(error)
});
});
}).catch((error) =>{
reject(error)
});
});
} else {
reject(error);
}
});
// create a request
let request = new AuthorizationRequest(
idpConfig.clientId, idpConfig.redirectUri, idpConfig.scope, AuthorizationRequest.RESPONSE_TYPE_CODE,
undefined, /* state */
{'prompt': 'consent', 'access_type': 'offline'});
logger.info('oauth2 authorization request', {
category: 'openid-connect',
config: configuration,
request: request
});
authorizationHandler.performAuthorizationRequest(configuration, request);
});
}