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服务不可用 #208

Open
baifachuan opened this issue Nov 30, 2021 · 3 comments
Open

修正gh-oauth.imsun.net服务不可用 #208

baifachuan opened this issue Nov 30, 2021 · 3 comments

Comments

@baifachuan
Copy link

baifachuan commented Nov 30, 2021

我之前一直用的gh-oauth.imsun.net 这个作为github的代理,不过不稳定,会随时失效,最近很长一段时间无法使用,因为我自己的服务器也是https,我看了下这个地址的代码也是需要https,所以自行搭建了一个,使用方式为:

修改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,所以构建在自己的服务下,需要的可以使用。

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.

原样的部署了一套这个server,作为自己的服务的代理,也共享出来有需要的可以进行使用。修改代码结果:

      _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();
    }
@baifachuan baifachuan changed the title gh-oauth.imsun.net服务不可用 修正gh-oauth.imsun.net服务不可用 Nov 30, 2021
@JiYouMCC
Copy link

JiYouMCC commented Jan 6, 2022

我同理也在azure部署了一个自己的……

@sariabiha
Copy link

@wowtalon
Copy link

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

4 participants