Capacitor - Android - getting error: Cannot read property 'digest' of undefined

Hi,

We have recently started using the @ionic-enterprise/auth for login into Azure ADB2C. We were able to run the capacitor application using React in Web but when we try to run the same application which calls the same API in Android we are getting the following error.

index.js:1452 Uncaught (in promise) TypeError: Cannot read property ‘digest’ of undefined
at sha256 (index.js:1452)
at generateChallengeAndVerifier (index.js:1391)
at IonicAzureConfig.generateChallengeAndVerifier (index.js:1487)
at index.js:2651
at new Promise ()
at IonicNativeAuth.login (index.js:2650)
at IonicAuth.login (index.js:3366)
at index.js:125
at onClick (InternalComponent.tsx:53)
at Object.leading (Button.tsx:69)

The above error comes when we try to call the login() function which is destructured via
const { login } = useAuthConnect();

Is there any solution for this so that it can work on Android Simulator?

Regards,
Lalit Hedaoo