Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-oauth.imsun.net 证书失效 #199

Open
asnowwolf opened this issue Feb 29, 2020 · 6 comments
Open

gh-oauth.imsun.net 证书失效 #199

asnowwolf opened this issue Feb 29, 2020 · 6 comments

Comments

@asnowwolf
Copy link

登录之后控制台出现如下错误:

POST https://gh-oauth.imsun.net/ net::ERR_CERT_AUTHORITY_INVALID

无法进行后续操作

@stopspazzing
Copy link

stopspazzing commented Mar 18, 2020

Same issue here.

@stopspazzing
Copy link

Problem is on Line #3415 of gitment.browser.js:
_utils.http.post('https://gh-oauth.imsun.net/', {
to
_utils.http.post('https://cors-anywhere.herokuapp.com/https://github.com/login/oauth/access_token', {

He was using gh-oauth.imsun.net as a CORS proxy to bypass the issue of the no accept headers issue. if you replace it with the above code it will work, but now spits out the error validation problem, which I believe is solved by a pull request. His website has an expired ssl cert which doesnt allow ssl websites from accessing it. So I bypassed his proxy with a well know CORS proxy above. While it is a solution to the problem, still passing keys to an uncontrolled proxy. FYI

@xiaozongyang
Copy link

same issue here

@shunhua
Copy link

shunhua commented Nov 11, 2021

一样的问题 都没解决吗?

@baifachuan
Copy link

修改gitment.browser.js文件的3416行将https://gh-oauth.imsun.net/
换成:
https://baifachuan.com:8443/

我自己重新搭建了一个这个代理服务。纯代理。

@baifachuan
Copy link

baifachuan commented Nov 30, 2021

修改gitment.browser.js文件的3416行将https://gh-oauth.imsun.net/替换成:https://baifachuan.com:8443/

该服务器代码在:https://github.com/imsun/gh-oauth-server,不会记录任何信息,我也是自己的博客使用:https:www.baifachuan.com,因为该服务器需要https,所以构建在自己的服务下,需要的可以使用。修改后的代码为:

      _utils.http.post('https://www.baifachuan.com:8443', {
        code: code,
        client_id: client_id,
        client_secret: client_secret
      }, '').then(function (data) {
        _this.accessToken = data.access_token;
        _this.update();
      }).catch(function (e) {
        _this.state.user.isLoggingIn = false;
        alert(e);
      });
    } else {
      this.update();
    }

update the gitment.browser.js file replace https://gh-oauth.imsun.net/ to https://baifachuan.com:8443/.
This service won't record or store anything. It only attaches a CORS header to that request and provides proxy. So that users can login in the frontend without any server-side implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@asnowwolf @stopspazzing @xiaozongyang @shunhua @baifachuan and others