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?
Asked
Active
Viewed 304 times
0

Cosmin D
- 639
- 1
- 11
- 24
1 Answers
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
-
Yes, I already figured it out. But is there a way to make it work in an unsafe environment? – Cosmin D Apr 04 '23 at 14:57
-
No, that's Chrome limitation – Lonli-Lokli Apr 04 '23 at 15:45