我一直在嘗試在 play 2.6 中使用 securesocial。我正在使用主快照。當(dāng)我點擊 GitHub 圖標(biāo)時,它會導(dǎo)航到 github.com,當(dāng)我輸入我的用戶名和密碼時,我得到 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條經(jīng)驗 獲得超10個贊
問題是我沒有在路由文件中添加重定向 URL 的路由。添加后-> /authenticate/github securesocial.Routes
解決了我的問題。/authenticate/github
是我在 github 上創(chuàng)建客戶端令牌時注冊的 URL
添加回答
舉報
0/150
提交
取消