2017-02-06 16 views
1
本番環境でのGoogleアカウントにログインをしようとしたときにときに私は次のエラーを取得してい

Servicestack - Googleの認証エラー

2017-02-06 10:34:26.8978|DEBUG|HttpResponseExtensionsInternal|Setting Custom HTTP Header: Accept-Ranges: bytes 
2017-02-06 10:34:26.8978|DEBUG|HttpResponseExtensionsInternal|Setting Custom HTTP Header: Location: https://accounts.google.com/o/oauth2/auth?client_id=XXXXX.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fproductionurl.com%2Fapi%2Fauth%2FGoogleOAuth&state=xxxxxxxx&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&response_type=code 
2017-02-06 10:34:26.8978|DEBUG|HttpResponseExtensionsInternal|Setting Custom HTTP Header: Content-Type: text/html; charset=utf-8 
2017-02-06 10:34:26.8978|DEBUG|HttpResponseExtensionsInternal|Setting Custom HTTP Header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate 
2017-02-06 10:34:26.8978|DEBUG|HttpResponseExtensionsInternal|Setting Custom HTTP Header: Pragma: no-cache 
2017-02-06 10:34:38.3492|WARN|StringMapTypeDeserializer|Property 'code' does not exist on type 'ServiceStack.Authenticate' 
2017-02-06 10:34:38.3492|DEBUG|RedisNativeClient|S: GET urn:iauthsession:tWsIDUa1jLZAXzXYK8Ob 
2017-02-06 10:34:38.3492|DEBUG|RedisNativeClient|R: $510 
2017-02-06 10:34:39.0678|ERROR|AppHost|DotNetOpenAuth.Messaging.ProtocolException: Error occurred while sending a direct message or getting the response. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request. 
    at System.Net.HttpWebRequest.GetResponse() 
    at DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options) 
    --- End of inner exception stack trace --- 
    at DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options) 
    at DotNetOpenAuth.Messaging.Channel.RequestCore(IDirectedProtocolMessage request) 
    at DotNetOpenAuth.Messaging.Channel.Request(IDirectedProtocolMessage requestMessage) 
    at DotNetOpenAuth.OAuth2.ClientBase.UpdateAuthorizationWithResponse(IAuthorizationState authorizationState, EndUserAuthorizationSuccessAuthCodeResponse authorizationSuccess) 
    at DotNetOpenAuth.OAuth2.WebServerClient.ProcessUserAuthorization(HttpRequestBase request) 
    at ServiceStack.Authentication.OAuth2.OAuth2Provider.Authenticate(IServiceBase authService, IAuthSession session, Authenticate request) 
    at ServiceStack.Auth.AuthenticateService.Authenticate(Authenticate request, String provider, IAuthSession session, IAuthProvider oAuthConfig) 
    at ServiceStack.Auth.AuthenticateService.Post(Authenticate request) 
    at lambda_method(Closure , Object , Object) 
    at ServiceStack.Host.ServiceRunner`1.Execute(IRequest request, Object instance, TRequest requestDto) 
2017-02-06 10:34:39.0990|ERROR|ServiceStackHost|ServiceBase<TRequest>::Service Exception 
The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() 
    at DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options) 

Facebookの認証を生産して完璧に動作します。開発ではGoogleとFacebookの両方の認証がうまく動作しますが、実際にはGoogle認証でのみこのエラーが発生しています。

どうやら、Googleの認証が正しく行われているネットワーク]タブでブラウザインスペクタで、私は、次のリダイレクト見ることができます:

https://productionurl.com/api/auth/GoogleOAuth?state=XXXXLiO-LQf6EoGYMw&code=XXXXXwduRVs96RIBCdkao2nQDgKDFvvQhT8

をしかし、何かが最後の認証ステップで間違って行きます。

運用環境はロードバランサの後ろにあります。バランサーが問題だろうか?

この問題を深く掘り下げる方法はありますか?

答えて

関連する問題