Bryan Migliorisi
Bryan Migliorisi

Reputation: 9210

Suddenly, DotNetOpenAuth returning (400) Bad Request

My application has been deployed for nearly 6 months and the latest release was about 3 weeks ago.

Suddenly, today Facebook Auth stopped working. The webapp was not changed or redeployed and the facebook app settings were not changed.

Authentication with Twitter still works correct.

This is the exception:

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.StandardWebRequestHandler.GetResponse(HttpWebRequest request)
   at DotNetOpenAuth.Messaging.Channel.GetDirectResponse(HttpWebRequest webRequest)
   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(HttpRequestInfo request)

Any idea what could have happened? I see nothing on Facebook's site about breaking changes or service degradation at the moment.

Upvotes: 4

Views: 1798

Answers (2)

Bryan Migliorisi
Bryan Migliorisi

Reputation: 9210

It started working again, leading me to believe that it was a bug on Facebook's end.

Upvotes: 0

Andrew Arnott
Andrew Arnott

Reputation: 81801

Quite likely Facebook finally upgraded their OAuth 2.0 support to comply with a more recent draft of the OAuth 2.0 spec that is incompatible with the version of DotNetOpenAuth that you're using. Try downloading the latest DotNetOpenAuth CTP and see if it helps.

That said, there's never been any guarantee of interoperability with the likes of Facebook or any other OAuth 2.0 server. OAuth 2.0 is not a finalized spec and as such interoperability problems are almost a guarantee.

Upvotes: 1

Related Questions