We implemented OAuth 2.0 using the web server authentication flow. It worked great in October / November, but suddenly it stopped working. Whenever we try to resolve another client, the server returns (400) "Bad request" with the body
{"error":"unsupported_grant_type","error_description":"grant type not supported"}
grant_type is set as authorization_code, which is definitely valid.
Is there a reason OAuth suddenly stops working?
Here's how we implemented OAuth:
The first user is redirected to: https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=blah.id&redirect_uri=https://domain.com/Web/Salesforce/Callback.aspx&scope=api%20refresh_token
A user asks Salesforce to log in to their account.
As soon as the user authenticates, Salesforce calls Callback.aspx, Callback.aspx requests an update token on behalf of the client, making a POST request: https://login.salesforce.com/services/oauth2/token with a payload:
grant_type = authorization_code & code = blah.code & client_id = blah.Id & client_secret = 11111111 & redirect_uri = HTTPS://domain.com/Web/Salesforce/Callback.aspx
Content Type Definitely: application / x-www-form-urlencoded
source share