question

Pat Golan avatar image
Pat Golan asked Mark Nigh answered

JS SDK incorrect header check error after move to vite

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.

sdkauthentication
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Mark Nigh avatar image
Mark Nigh answered

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

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys