I have an application on Angular 11.
After implementing SSR, I got the error “For security reasons, window.crypto is required to run `auth0-spa-js” and I know it is because of SSR not allowing “window”.
Question is, how can avoid this problem by auth0 side.
In your application, is window available even though it is SSR?
If an error is thrown in this case, I’d recommend opening up an issue in the repo directly so that the maintainers may assist. Issues · auth0/auth0-spa-js · GitHub
Thanks for the reply! It’d be best to open an issue on the repo for this so that the maintainers can assist directly: Issues · auth0/auth0-spa-js · GitHub
“window” isn’t available in Angular SSR, indeed we need some npm package compatible with Angular SSR (Angular Universal). As @noragrossman has said, isn’t a easy option…
By other hand, we can open an issue on that repo, just asking here if someone has found a workaround by now.