Please follow the issue template below. Failure to do so will result in a delay in answering your question.
[email protected] or @azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]Important: Please fill in your exact version number above, e.g. [email protected].
n/a
When trying to SSR the code, window not being defined causes the SSR to fail
ReferenceError: window is not defined
at Function.BrowserUtils.getBrowserNetworkClient (PATH_TO_PROJECT/node_modules/@azure/msal-browser/src/utils/BrowserUtils.ts:67:9)
n/a
import MSAL and try SSR'ing
the code should be more sensitive to window not being defined
node. Yes, I know this a browser-based package, trying to SSR for the browser! Perhaps delaying the call that checks for window (or probably fetch) until runtime would help.
Thanks!
@mbrevda This is a known issue that we intend to fix. We will follow up when we have done so.
I hate to ask, but can you give a unit of measure for an ETA (days/weeks/months)?
@mbrevda Unfortunately, we are not able to give a more specific timeline yet, but we would like to have this fixed soon.
@mbrevda There is now a PR open to fix this scenario, and will be included in an upcoming release of MSAL.js v2. This issue will be updated when that PR has been accepted and merged.
I saw, thanks for pointing it out! Looking forward to the release