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

博客站点支持Github登陆/发帖/评论 #3

Closed
2 of 4 tasks
axetroy opened this issue Apr 25, 2017 · 0 comments
Closed
2 of 4 tasks

博客站点支持Github登陆/发帖/评论 #3

axetroy opened this issue Apr 25, 2017 · 0 comments

Comments

@axetroy
Copy link
Owner

axetroy commented Apr 25, 2017

已完成部分认证.

就差在获取 access_token 这一步, 而且这一步是禁止跨域的POST请求

POST https://github.com/login/oauth/access_token

对于serveless的站点来说, 是有点蛋疼

相关问题: isaacs/github#330

OAuth2架构: https://tools.ietf.org/html/rfc6749#section-4.2

出于一些安全问题, OAuth验证无法在纯粹的浏览器内完成

  • 去搭建一个专门用来跨域的服务器

专门用与通过code获取access_token
GET https://axetroy.herokuapp.com/oauth?code=xxxx

  • 登陆Github

本地调试有些麻烦
Github授权登陆之后, 需要跳转地址, 而这个地址不能指向本地. 地址必须和APP里面填写的url同域

  • 发布文章
  • 站内通过登陆Github账号, 发布评论

已废弃

目前授权登陆已完成, 但是不做后续的东西了
没有考虑周全, 使用Github有天然的优势

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

No branches or pull requests

1 participant