znck / grammarly

Grammarly for VS Code
https://marketplace.visualstudio.com/items?itemName=znck.grammarly
MIT License
1.62k stars 110 forks source link

Support for Code OSS. On Grammarly login redirect, getting "Error - Invalid scheme: code-oss " #293

Open eihli opened 1 year ago

eihli commented 1 year ago

https://github.com/microsoft/vscode/

From https://github.com/znck/grammarly/blob/main/redirect/functions/redirect.js

const schemes = new Set(['vscode', 'vscode-insiders', 'vscodium'])

function validate(scheme, hostname, pathname) {
  if (!schemes.has(scheme)) throw new Error(`Invalid scheme: ${scheme}`)
  if (hostname !== 'znck.grammarly') throw new Error(`Invalid authority: ${hostname}`)
  if (pathname !== '/auth/callback') throw new Error(`Invalid path: ${pathname}`)
}

I'm getting the following error.

image

felipecrp commented 1 year ago

I have the same problem with vscode - oss. It works with normal vscode.

benjamin-asdf commented 1 year ago

Can you please add code-oss scheme?

ioannis-vm commented 1 year ago

I am having the same issue.

benjamin-asdf commented 1 year ago

Btw you can ~fix~ workaround this by installing code instead of code-oss. I know that is a horrible local maximum thing to do lol. I installed visual-studio-code-bin on arch. Works.

ioannis-vm commented 1 year ago

That works indeed. Thanks.