Closed sam-1994 closed 11 months ago
You need to ensure your browser/environment support crypto APIs as they are required for MSAL to function. Note that crypto APIs are only available in secure contexts (HTTPS). This is unfortunately not something we're going to be able to help you debug - you'll need to figure out why these APIs are not available in your environment.
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
3.5.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
3.0.8
Public or Confidential Client?
Public
Description
After upgrading to the msal 3 major version, I am not able to run my built application. I get the same error which is already mentioned twice inside another issue, which is already closed:
Something strange is that is works with the development server, but if I build it (using Docker: node:18-alpine) and run it within an NGINX (using Docker: nginxinc/nginx-unprivileged:1.24-alpine), the error is shown in the console.
My modules looks like this
Unfortunatelly this is not only blocking our company project from updating the msal packages to the 3.x versions, but also to update Angular to Angular 16 since there is no support for this anymore from MSAL Angular v2
Error Message
Msal Logs
3 '[Fri, 01 Dec 2023 08:58:42 GMT] : [] : @azure/msal-browser@3.5.0 : Verbose - BrowserCrypto: modern crypto interface available' false
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Expected Behavior
The build is not broken
Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
Chrome, Firefox, Safari
Regression
@azure/msal-angular: 2.5.12, @azure/msal-browser: 2.38.3
Source
External (Customer)