JetBrains GitHub OAuth Fails Due to Redirect to `127.0.0.1`

I'm trying to authenticate my GitHub account with JetBrains (PyCharm 2024.3.4) and keep getting this error message:

"We were unable to authorize you in GitHub. Sorry for inconvenience, please try again later."


 

After digging into the network requests in DevTools, I noticed that JetBrains is using a `127.0.0.1` redirect URL during the OAuth flow:

 

http://127.0.0.1:63342/api/github/oauth/authorization_code
 

This results in a 302 redirect to the error page:

 

 

UPDATE:
Found out that the error is resulting from generated url inside PyCharm. the url has parameter called `callback_url` and it is pointing to localhost.

https://account.jetbrains.com/github/oauth/intellij/authorize?code_challenge=some_code&callback_url=http%3A%2F%2F127.0.0.1%3A63342%2Fapi%2Fgithub%2Foauth%2Fauthorization_code

After updating the PyCharm app to latest version, PyCharm 2024.3.5, the error is resolved.
 

0

Please sign in to leave a comment.