[email protected] or @azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]React 16.12.0
In iOS Safari, acquireTokenSilent does not complete. No result is ever processed, no error is caught.
No
No
var instance = 'https://login.microsoftonline.com/tfp/';
var tenant = 'nssapp.onmicrosoft.com';
var signInPolicy = 'B2C_1_signup_signin_v2';
var authority = `${instance}${tenant}/${signInPolicy}`
export const msalApp = new UserAgentApplication({
auth: {
clientId: "abcdabcd-643f-4914-9a04-dff4097879fb",
authority: authority,
validateAuthority: true,
postLogoutRedirectUri: window.location.origin,
navigateToLoginRequestUrl: false
},
cache: {
cacheLocation: "sessionStorage",
storeAuthStateInCookie: isIE()
},
system: {
navigateFrameWait: 0,
logger: {
error: console.error,
errorPii: console.error,
info: console.log,
infoPii: console.log,
verbose: console.log,
verbosePii: console.log,
warning: console.warn,
warningPii: console.warn
}
}
});
Uses Azure B2C. Flow is the provided b2c_1_signup_signin_v2 .
** This is not entirely true. An error is never received. Occasionally, the promise does complete, and the object passed in has a valid accessToken. After this point, the app continues to run fine. The frequency of this is very low.
On other browsers, acquireTokenSilent always seems to complete fine, and the result includes a valid accessToken that is accepted by the target API.
Fault occurs on:
Fault does not occur on:
Behavior is the same whether cross-site tracking prevention is turned on or off.
Delaying the calls mentioned in the reproduction steps seems to have no noticeable effect on the behavior.
My experience in js/react/... is very limited, so I could be doing something pretty silly. However, this does work fine in other browsers I've tried. A user reported a similar-looking issue in Chrome on Windows once, but I haven't been able to reproduce that. Could be related.
I looked over similar issues and tried a few things suggested, but the behavior didn't change, and it didn't seem like any were identical to my issue.
Could https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/1354 be a fix?
[Log] renewing accesstoken (2.1114f352.chunk.js, line 2)
[Log] renewToken is called for scope:https://nssapp.onmicrosoft.com/nssreactapi/user_impersonation (2.1114f352.chunk.js, line 2)
[Log] Add msal frame to document:msalRenewFramehttps://nssapp.onmicrosoft.com/nssreactapi/user_impersonation (2.1114f352.chunk.js, line 2)
[Log] Renew token Expected state: aa28b938-c0e8-427b-9e53-0de3a4ac791c (2.1114f352.chunk.js, line 2)
[Log] Navigate to:https://login.microsoftonline.com/te/nssapp.onmicrosoft.com/b2c_1_signup_signin_v2/oauth2/v2.0/authorize?response_type=token&scope=https%3A%2F%2Fnssapp.onmicrosoft.com%2Fnssreactapi%2Fuser_impersonation%20openid%20profile&client_id=abcdabcd-643f-4914-9a04-dff4097879fb&redirect_uri=https%3A%2F%2Fapp.nss.network%2F&state=aa28b938-c0e8-427b-9e53-0de3a4ac791c&nonce=c52296a9-0915-4e79-b7b4-536444310d2b&client_info=1&x-client-SKU=MSAL.JS&x-client-Ver=1.2.1&login_req=0380f6d1-69a8-4970-afd4-eda0e28952dd-b2c_1_signup_signin_v2&domain_req=34f8bf94-6258-4891-b74e-4578c7d7ad23&domain_hint=organizations&client-request-id=ee20e51e-ea95-4c77-b54c-8da9b51e46a3&prompt=none&response_mode=fragment (2.1114f352.chunk.js, line 2)
[Log] Set loading state to pending for: https://nssapp.onmicrosoft.com/nssreactapi/user_impersonation:aa28b938-c0e8-427b-9e53-0de3a4ac791c (2.1114f352.chunk.js, line 2)
[Log] LoadFrame: msalRenewFramehttps://nssapp.onmicrosoft.com/nssreactapi/user_impersonation (2.1114f352.chunk.js, line 2)
[Log] Add msal frame to document:msalRenewFramehttps://nssapp.onmicrosoft.com/nssreactapi/user_impersonation (2.1114f352.chunk.js, line 2)
[Log] Frame Name : msalRenewFramehttps://nssapp.onmicrosoft.com/nssreactapi/user_impersonation Navigated to: https://login.microsoftonline.com/te/nssapp.onmicrosoft.com/b2c_1_signup_signin_v2/oauth2/v2.0/authorize?response_type=token&scope=https%3A%2F%2Fnssapp.onmicrosoft.com%2Fnssreactapi%2Fuser_impersonation%20openid%20profile&client_id=abcdabcd-643f-4914-9a04-dff4097879fb&redirect_uri=https%3A%2F%2Fapp.nss.network%2F&state=aa28b938-c0e8-427b-9e53-0de3a4ac791c&nonce=c52296a9-0915-4e79-b7b4-536444310d2b&client_info=1&x-client-SKU=MSAL.JS&x-client-Ver=1.2.1&login_req=0380f6d1-69a8-4970-afd4-eda0e28952dd-b2c_1_signup_signin_v2&domain_req=34f8bf94-6258-4891-b74e-4578c7d7ad23&domain_hint=organizations&client-request-id=ee20e51e-ea95-4c77-b54c-8da9b51e46a3&prompt=none&response_mode=fragment (2.1114f352.chunk.js, line 2)
@tragdorvigani1 Yes, I believe #1354 should fix this. Working to have that released soon.
@jasonnutter Thanks! [Is there some way I can register for a notification for that release? If it'll take a while I could try patching the changes myself, to find out whether it solves the issue.] - never mind, it's pretty obvious I can watch that topic if I actually have a look on the page...
The fix for this is available in [email protected], please try that version and confirm that it has been fixed, thanks!
Hi @jasonnutter - just a note to say that this is fixed, also confirmed in 1.3.0. Thanks!