Open luisrudge opened 8 years ago
Actually, this happens in other places as well:
Needed this as well, basically the document just used for injecting style. Any timeframe we can expect? Or the team not plan to work on this at all?
If your using next.js, check out this blog building-universal-apps-with-nextjs
Replace the cdn with this instead
<script src="http://cdn.auth0.com/js/lock-passwordless-2.2.3.min.js"></script>
I receive the same error, basically document is not defined using server side rendering.
For example , failing on document : https://github.com/auth0/lock-passwordless/blob/master/src/atom/index.js#L3
how can I solve this? I use an Angular2 app combined with asp.NET Javascript services.
To solve this, you have to make sure to require this lib only in the client. In angular, I think you can require it on dom load.
I'm trying to use this lib with an universal app, but it's throwing an exception here because document is undefined when it's a server side render. Can we add a check to see if document exists or perhaps only run this code inside the constructor?