imsun / gitment

A comment system based on GitHub Issues.
https://imsun.github.io/gitment/
MIT License
4.06k stars 347 forks source link

点击login会url链接报错 #86

Open pplmx opened 6 years ago

pplmx commented 6 years ago

比如https://caoyu.info/blog/spring-injection-failed.html在这个页面点击登录,它最后会跳向以下地址 https://caoyu.info/blog/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch

VeiZhang commented 6 years ago

+1 我也出现了,请问如何解决呢?

pplmx commented 6 years ago

@VeiZhang 换成来必力了............解决不掉,明明配置都是正确的,可是就是跳转失败........

VeiZhang commented 6 years ago

我是集成nexT,也是不成功。。看着眼红

pplmx commented 6 years ago

@VeiZhang 无奈

VeiZhang commented 6 years ago

@mystic-cg 感觉像是重定向的原因,我不是name.github.io的网站

pplmx commented 6 years ago

@VeiZhang 我也不是,我的是https://caoyu.info 而且还使用了cloudflare代理成https了

VeiZhang commented 6 years ago

@mystic-cg 好漂亮的主页呀^_^。我把CMAKE重定向域名去掉了,可以集成gitment

VeiZhang commented 6 years ago

@mystic-cg 嘿嘿,我解决了。http://tiimor.cn/HelloWorld/

VeiZhang commented 6 years ago

@mystic-cg 尝试一下这样,我也是误打误撞弄出来的:先不用CMAKE,用yourname.github.io作为主页链接,修改OAuth Apps回调链接,然后部署博客网站,集成gitment,授权,初始化任意一篇文章后,就可以评论了;接着将主页链接改回来,修改OAuth Apps,重新部署。

pplmx commented 6 years ago

@VeiZhang 我就用来必力了,还可以让身边的非程序员们留言评论,等它啥时候挂了,再换回gitment了

VeiZhang commented 6 years ago

@mystic-cg 我之前也是用了来必力,发现被评论了,没有提醒,就一直期待gitment

pplmx commented 6 years ago

@VeiZhang 期待它变得更好

C1oudust commented 6 years ago

我把项目挂载到coding上了,不过仓库填的是GitHub的,使用gitment显示的是Error: Not Found...

tidus5 commented 6 years ago

我开始也出现这个问题。 然后发现如果挂了自己域名的, callback 要填具体的博客域名,而不是默认的xxx.github.io 那个。。。 然后 repo 地址才是写xxx.github.io 就行

Donaldhan commented 6 years ago

我也遇到这样的问题,评论区显示为Error: Not Found,登陆重定到仓库地址

Donaldhan commented 6 years ago

应该放在github调试,本地调试会出问题, @tidus5 说的对,repo应该为xxx.github.io

iamsea commented 6 years ago

@mystic-cg 如果做了www重定向,去掉就行了,包括CNAME文件,域名服务商重定向解析,cloudflare重定向解析

HaoweiCh commented 6 years ago

额,,无奈。。我现在卡在貌似也是这个问题上。

HaoweiCh commented 6 years ago

不仅是我的站点,,我去看的每一个用gitment的博客都是这样。。。

nicksors commented 6 years ago

@tidus5 感谢您,我根据您的提示解决了该问题,下面说下我使用的场景:

  1. nicksors.cc 是我的注册的域名,CNAME解析了nicksors.github.io;
  2. 那么在注册OAuth Application的时候,Authorization callback URL这一项就应该填写https://nicksors.cc,而不是https://nicksors.github.io
  3. 我使用的hexo主题是yilia,配置Gitment选项gitment_repo: 'nicksors.github.io',其他正常填写即可。 以上,我的Gitment评论登录问题得到了解决,也希望能给其他朋友一个参考。 再次感谢您。
heyuhua1992 commented 6 years ago

hexo + next +gitment

CNAME 中的内容与OAuth Apps中的Homepage URL、Authorization callback URL 链接内容一致,可以正常登陆

yetHandsome commented 5 years ago

@tidus5 感谢您,我根据您的提示解决了该问题,下面说下我使用的场景:

  1. nicksors.cc 是我的注册的域名,CNAME解析了nicksors.github.io;
  2. 那么在注册OAuth Application的时候,Authorization callback URL这一项就应该填写https://nicksors.cc,而不是https://nicksors.github.io
  3. 我使用的hexo主题是yilia,配置Gitment选项gitment_repo: 'nicksors.github.io',其他正常填写即可。 以上,我的Gitment评论登录问题得到了解决,也希望能给其他朋友一个参考。 再次感谢您。

必须将自己的域名 CNAME解析到 xxx.github.io;这样吗?