I have created an app and registered it in the Enterprise Portal (version 11.1). Authentication is implemented like in the sample below .
var info = new OAuthInfo({
appId: pConfig.appId,
portalUrl: pConfig.domain + "portal",,
popup: false
});
esriId.registerOAuthInfos([info]);
esriId.checkSignInStatus(info.portalUrl + "/sharing").then(function (r) {
//console.log (info.portalUrl);
token = r.token;
_show();
}).catch(() => {
esriId.getCredential(info.portalUrl + "/sharing");
});
Whenever I start the application while I am in a new browser tab, a prompt appears asking me if the application is allowed to use my credentials

In the portal settings, under security, there is a section "approved apps" in which applications can be registered so that this should not occur. However, registering my app here does not appear to have any effect. Do I need to do something different?