0

I build the angular universal and MSAL B2C project. After run build:ssr and run dev:ssr I get an error: ERROR BrowserAuthError: crypto_nonexistent: The crypto object or function is not available. Detail:Browser crypto, msCrypto, or msrCrypto interfaces not available.

enter image description here

"@azure/msal-angular": "^2.5.7",
"@azure/msal-browser": "2.37",
"@angular/core": "^15.0.2",
"@nguniversal/express-engine": "^15.2.1",

Please help me clarify why getting this error and a solution to resolve it.

Ahmad Alfy
  • 13,107
  • 6
  • 65
  • 99
Len
  • 1
  • 1
  • This is because that `crypto` object is not available on node. You need to use a polyfill for that part https://github.com/PeculiarVentures/webcrypto – Ahmad Alfy May 29 '23 at 17:43

0 Answers0