gpt4 book ai didi

grails - 使用 Google 帐户和 OAuth 插件登录 Grails 应用程序

转载 作者:行者123 更新时间:2023-12-02 16:00:49 26 4
gpt4 key购买 nike

我正在尝试创建一个登录页面,用户可以在其中使用他们的 Google 帐户登录。我正在使用 grail 的 'oauth:2.6.1' 插件来实现这一点。
我在谷歌注册了一个应用程序并获得了客户端 ID 和密码,但我无法在我的 config.groovy 中使用它。它抛出以下异常:

[http-bio-8080-exec-10] ERROR errors.GrailsExceptionResolver  - OAuthException occurred when processing request: [GET]    /MyApp/oauth/google/authenticate - parameters:
redirectUrl:
Response body is incorrect. Can't extract token and secret from this: 'Consumer is not registered: 553489692142-6l3c1tk0l0rtc7dgebeijbh5jtcv4tor.apps.googleusercontent.com
'. Stacktrace follows:
Message: Response body is incorrect. Can't extract token and secret from this: 'Consumer is not registered: 553489692142-6l3c1tk0l0rtc7dgebeijbh5jtcv4tor.apps.googleusercontent.com
'
Line | Method
->> 41 | extract in org.scribe.extractors.TokenExtractorImpl
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 27 | extract in ''
| 64 | getRequestToken in org.scribe.oauth.OAuth10aServiceImpl
| 40 | getRequestToken in ''
| 45 | getRequestToken in ''
| 78 | authenticate in uk.co.desirableobjects.oauth.scribe.OauthController
| 198 | doFilter . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 1145 | runWorker . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . . . . in java.lang.Thread

我的 grails 版本是 2.5。请帮我解决这个问题。

最佳答案

您的 google api 凭据似乎很糟糕。在谷歌开发者控制台中检查你的 key / secret 。

关于grails - 使用 Google 帐户和 OAuth 插件登录 Grails 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31261693/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com