mongodb / stitch-js-sdk

MongoDB Stitch JavaScript SDK
Apache License 2.0
113 stars 67 forks source link

ReferenceError: self is not defined #419

Open daploydev opened 4 years ago

daploydev commented 4 years ago

Trying to use nextjs with the npm sdk and getting self is not defined from node_modules\whatwg-fetch\dist\fetch.umd.js should I use the script sdk in head instead

daploydev commented 4 years ago

I was able to get anon auth working with stitch and next but you need to put the javscript sdk in the head tag and not install it as a node module and then a small script to initialize your app id and log the user in when the page loads in the browser.