我一直在尝试在 play 2.6 中使用 securesocial。我正在使用主快照。当我点击 GitHub 图标时,它会导航到 github.com,当我输入我的用户名和密码时,我得到 action not found 错误http://localhost:9000/authenticate/github?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%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect -uri-mismatch&state=9eb23bec-37b6-4930-9b76-899ff8e1fbe1。下面是我的路由文件GET / controllers.Application.indexGET /home @controllers.Application.goHomeGET /userAware @controllers.Application.userAwareGET /link-result @controllers.Application.linkResultGET /current-user @controllers.Application.currentUser# Map static resources from the /public folder to the /assets URL pathGET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)-> /auth securesocial.Routes在securesocial.conf中我添加了 onLoginGoTo = /home
2 回答
白衣染霜花
TA贡献1796条经验 获得超10个赞
问题是我没有在路由文件中添加重定向 URL 的路由。添加后-> /authenticate/github securesocial.Routes
解决了我的问题。/authenticate/github
是我在 github 上创建客户端令牌时注册的 URL
添加回答
举报
0/150
提交
取消