Closed zhenglaizhang closed 3 years ago
@zhenglaizhang Is this still an issue? This library is currently in maintenance phase and we are taking only security bugs. If this issue persists, can you please leave the feedback on the repo below?
We are currently in the design phase of a new version of this library, which can be tracked here. The timeline for the new library will be uploaded to our msal js repo.
The aadutils.js has logic to check if userAgent includes some specific agent, but for some kind requests, the userAgent is empty, and exception is thrown as below:
TypeError: Cannot read property 'includes' of undefined at exports.sameSiteNotAllowed (/app/node_modules/passport-azure-ad/lib/aadutils.js:285:21) at CookieContentHandler.add (/app/node_modules/passport-azure-ad/lib/cookieContentHandler.js:142:31) at Strategy.flowInitializationHandler [as _flowInitializationHandler] (/app/node_modules/passport-azure-ad/lib/oidcstrategy.js:1408:32) at /app/node_modules/passport-azure-ad/lib/oidcstrategy.js:645:23 at fn (/app/node_modules/passport-azure-ad/node_modules/async/lib/async.js:746:34) at /app/node_modules/passport-azure-ad/node_modules/async/lib/async.js:1213:16 at /app/node_modules/passport-azure-ad/node_modules/async/lib/async.js:166:37 at /app/node_modules/passport-azure-ad/node_modules/async/lib/async.js:706:43 at /app/node_modules/passport-azure-ad/node_modules/async/lib/async.js:167:37 at /app/node_modules/passport-azure-ad/node_modules/async/lib/async.js:1209:30