LiLittleCat / intellij-chatgpt

A plugin that integrates ChatGPT and other third-party mirror sites into JetBrains IDEs.一个将 ChatGPT 和其他第三方镜像网站整合到 JetBrains IDEs 的插件。
https://plugins.jetbrains.com/plugin/20629-chatgpt-tool
Apache License 2.0
141 stars 17 forks source link

Not support login by 'Continue With Google' #7

Open StarryTang opened 1 year ago

StarryTang commented 1 year ago

image

StarryTang commented 1 year ago

When I log in through 'Continue With Google',it ask that the current browser is not secure and I cannot log in.

KrunchMuffin commented 1 year ago

same

Couldn’t sign you in This browser or app may not be secure. Try using a different browser. If you’re already using a supported browser, you can try again to sign in.

LiLittleCat commented 1 year ago

@StarryTang @KrunchMuffin Sorry for the late reply, it seems that Google does not think JCEF is safe, I will ask the JetBrains team to see how to solve this.

emahuni commented 1 year ago

Can we just enter the token into the settings as an alternative?

one can get the token through https://chat.openai.com/api/auth/session, but when i do it still wants me to login.

LiLittleCat commented 1 year ago

@emahuni, Of course, you can, but the token you get through https://chat.openai.com/api/auth/session is an access token for a session. The token needed to enter in settings is a session token, you can get a session token by the steps:

  1. Go to https://chat.openai.com/chat and log in or sign up.
  2. Open dev tools.
  3. Open Application > Cookies. pSSKdmR.png
  4. Copy the value for __Secure-next-auth.session-token as settings value. pSSK6pD.png

After you enter the session token, you need to restart the IDE because ChatGPT Tool Windows needs a restart, and you won't need to log in until the session token is expired.

emahuni commented 1 year ago

@emahuni, Of course, you can, but the token you get through https://chat.openai.com/api/auth/session is an access token for a session. The token needed to enter in settings is a session token, you can get a session token by the steps:

  1. Go to https://chat.openai.com/chat and log in or sign up.
  2. Open dev tools.
  3. Open Application > Cookies. pSSKdmR.png
  4. Copy the value for __Secure-next-auth.session-token as settings value. pSSK6pD.png

After you enter the session token, you need to restart the IDE because ChatGPT Tool Windows needs a restart, and you won't need to log in until the session token is expired.

Sweet! it works

emahuni commented 1 year ago

I updated Webstorm to the latest and it updated your plugin, now there is nowhere to enter that token anymore, just url something something. what happened?

LiLittleCat commented 1 year ago

I updated Webstorm to the latest and it updated your plugin, now there is nowhere to enter that token anymore, just url something something. what happened?

Hi @emahuni, I wanted to let you know that I removed the token settings because it was causing an issue, but unfortunately, I wasn't able to find a solution for it. You can see more details about the problem in this GitHub issue: https://github.com/LiLittleCat/intellij-chatgpt/issues/16#issuecomment-1477877290.

I was wondering, are you using a Google account to log in to the official website? If the token settings are necessary, perhaps I should bring them back and work on finding a solution to the issue.

jmigliavacca commented 1 year ago

Yes, it's needed. I cannot log in otherwise. If I use google, it won't let me in because of browser security concerns, and openai doesn't let me change the authentication method.

emahuni commented 1 year ago

Yes, it's needed. I cannot log in otherwise. If I use google, it won't let me in because of browser security concerns, and openai doesn't let me change the authentication method.

Exactly

skorpions2000 commented 1 year ago

I noticed your dialog, don't know if it's related?... I described my problem here... https://github.com/LiLittleCat/intellij-chatgpt/issues/28 Unfortunately the plugin doesn't work at all...