Closed ThomVanL closed 1 year ago
Thanks for the detailed issue! Can you share you configuration being used with the library? Interested in what sort of caching methods you're using. At a minimum, there is at least a null reference exception occurring in the code you highlighted which can be resolved. The AADSTS50058
code being received will take some more investigation.
Sure thing, I was using a production app when I reported the issue but I'm seeing the same thing happen in the sample app. Again though, this is only occurring with the redirect flow.
So here is the config from the sample app.
import { MsalAuthProvider, LoginType } from "react-aad-msal";
import { Logger, LogLevel } from "msal";
export const authProvider = new MsalAuthProvider(
{
auth: {
authority: "https://login.microsoftonline.com/common",
clientId: "0f2c6253-3928-4fea-b131-bf6ef8f69e9c",
postLogoutRedirectUri: window.location.origin,
redirectUri: window.location.origin,
validateAuthority: true,
navigateToLoginRequestUrl: false
},
system: {
logger: new Logger(
(logLevel, message, containsPii) => {
console.log("[MSAL]", message);
},
{
level: LogLevel.Verbose,
piiLoggingEnabled: false
}
)
},
cache: {
cacheLocation: "sessionStorage",
storeAuthStateInCookie: true
}
},
{
scopes: ["openid"]
},
{
loginType: LoginType.Popup,
tokenRefreshUri: window.location.origin + "/auth.html"
}
);
I just realized this bug filed on MSAL repo: https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/1205
Seems this may be a known issue for Safari browsers until the next release includes the new Auth Code Flow w/ PKCE.
But the null reference exception should still be fixable at the least.
I just realized this bug filed on MSAL repo: AzureAD/microsoft-authentication-library-for-js#1205
Hi @AndrewCraswell , Just checked that the bug you mentioned has been closed in March. The authors are now advising to use @azure/msal-browser for PKCE flow. Any plans on integrating this to react-aad ?
Yes, there are discussions but it will require more or less a rewrite. At the moment I'm pretty swamped with a product release upcoming, but my goal would be to have something ready in a month or two.
Hi @AndrewCraswell any update on working with @sameerag from the MSAL.js team to update this library to use PKCE? It seems that with the latest versions of Chrome(84) blocking 3rd party cookies, PKCE is fast becoming the only user friendly doing the MSAL auth. FYI: @alex-mason-by and @dj-jovic-by
Should be resolved by #238
Describe the bug Whenever I try to get an access token with LoginType Redirect in Safari 13, I end up receiving the following error: Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'response.tokenType').
I'm getting the same behavior with the sample app, LoginType Popup however does seem to work.
Additionally I found this error in the session state:
To Reproduce Steps to reproduce the behavior:
Expected behavior Receive an access token similarly to when using LoginType Popup.
Desktop (please complete the following information):
Additional context package json dependencies:
Logs:
Apparently this points to the following piece of code: