0

I set up an angular oidc client for an angular application and deployed to an ec2 machine. Even if the authentication works fine on local machine, on the ec2 machine I receive the following error in the console: ERROR TypeError: Cannot read properties of undefined (reading 'digest'). I understood that is related to the fact that in runs in an unsecure environment. Is there a way to fix this error?

Cosmin D
  • 639
  • 1
  • 11
  • 24

1 Answers1

0

The error is cased by the unsafe environment since webcrypto is not available, it you are hosting via HTTP, not https (or your certificate is invalid)

In Chrome secure origin are the ones that match the following (scheme, host, port) patterns:

(https, *, *) - HTTPS (wss, *, ) - Web Socket Secure (, localhost, ) - localhost (, 127/8, ) - IPv4 loopback (, :: 1/128, *) - IPv6 loopback

Lonli-Lokli
  • 3,357
  • 1
  • 24
  • 40