Okta Widget Reactjs Application Integration

We are using the @okta/okta-signin-widget to integrate with the front end reactjs/node based application.
When starting the server we are faced with error. Seems like this doen’t support server-side rendering in isomorphic environment. We tried to create an empty window object but are facing the similar issue. Please help us resolve this roadblock.

ReferenceError: window is not defined
at D:\Project\Codebase\NewCodebase\cobp-fe\node_modules\u2f-api-polyfill\u2f-api-polyfill.js:14:16
at Object. (D:\Project\Codebase\NewCodebase\cobp-fe\node_modules\u2f-api-polyfill\u2f-api-polyfill.js:753:3)
at Module._compile (module.js:570:32)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)

Also, on using require.ensure in componentDidMount, we get the error

Uncaught (in promise) Error: only one instance of babel-polyfill is allowed
at Object. (okta-sign-in.entry.js:74)
at Object. (okta-sign-in.entry.js:93)
at webpack_require (okta-sign-in.entry.js:30)
at Object. (okta-sign-in.entry.js:57)
at webpack_require (okta-sign-in.entry.js:30)
at okta-sign-in.entry.js:50
at okta-sign-in.entry.js:53
at webpackUniversalModuleDefinition (okta-sign-in.entry.js:3)
at Object.975 (okta-sign-in.entry.js:10)
at webpack_require (bootstrap 72d64d0e80382f35cb48:691)

I think you have run into the same issue as:

We are treating server-side rendered JS as an enhancement to the sign in widget. Sorry I don’t have any better news here.