Skip to content

Login error on a remote server #72

Discussion options

You must be logged in to vote

The error says TypeError: Cannot read properties of undefined (reading 'digest')
That means somewhere in the code, we have x.digest, where x=undefined.

The only place in the code where the .digest property is accessed, is in pkceUtils.ts, where line 27 reads:

const hash: ArrayBuffer = await window.crypto.subtle.digest('SHA-256', bytes) // sha256 hash it

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 that localhost is considered a "secure origin").

Is it possible that this is the issue? If so, t…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jonas-sasin
Comment options

@sebastianvitterso
Comment options

Answer selected by jonas-sasin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants