Posted by Shaurya Sisodia, on 01 Aug 2019
I tried to integrate Portis into one of my projects that I was building with the Next.js framework but was constantly facing an issue. On discussing in the support group I found that Portis doesn't support server-side rendering yet, hence the error. So, I request to add the proposed functionality because SSR frameworks like Next.js really make life a lot easier for us developers and inability to do so causes trouble.
The error I was facing was: ReferenceError: location is not defined at Object.validateSecureOrigin (/home/shaurya/dapp01x/nodemodules/ portis/web3/lib/utils/secureOrigin.js:4:23 at new Portis (/home/shaurya/dapp01x/nodemodules/ portis/web3/lib/index.js:59:24 Module../ethereum/web3.js (and further continuation of the stack trace)