Login error on a remote server #72
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The error says The only place in the code where the const hash: ArrayBuffer = await window.crypto.subtle.digest('SHA-256', bytes) // sha256 hash it This means that Is it possible that this is the issue? If so, the solution is to serve the web site/application via HTTPS. |
Beta Was this translation helpful? Give feedback.
The error says
TypeError: Cannot read properties of undefined (reading 'digest')
That means somewhere in the code, we have
x.digest
, wherex=undefined
.The only place in the code where the
.digest
property is accessed, is inpkceUtils.ts
, where line 27 reads:This means that
window.cryptio.subtle
is undefined in you context, which according to [this StackOverflow answer], always happens in "unsecure contexts". Basically, it won't work on sites running via http, only for sites running via https (note thatlocalhost
is considered a "secure origin").Is it possible that this is the issue? If so, t…