Question

JS SDK incorrect header check error after move to vite

  • 8 May 2023
  • 1 reply
  • 142 views

Hi,

We recently upgraded our app from vue2 to vue3 which also include moving from webpack to vite.


On webpack we were using following code to login:

platform
  .loginWindow({
    url: platform.loginUrl({ usePKCE, redirectUri }),
  })
  .then(rcsdk.login.bind(platform))
  .then(res => {
    const data = res.json()
    store.dispatch('saveRingCentralToken', data)
  })

Now it doesn't work. I'm getting following error


I compared request headers from vue3 and vue2. vue3 app is missing cookie headers.


From what i know vite doesn't work well with old node packages and my suspicion are the polyfills, but it's above my frontend knowledge.


1 reply

@Pat Golan Did you get this working? I have the same problem but with react/vite. I installed nodePolyFills from vite-plugin-node-polyfills.

Reply