OneDrive / onedrive-sdk-csharp

OneDrive SDK for C#! https://dev.onedrive.com
Other
294 stars 143 forks source link

GetSilentlyAuthenticatedMicrosoftAccountClient builds an invalid HTTP request #129

Closed opicko closed 8 years ago

opicko commented 8 years ago

With some Microsoft Accounts when I call GetSilentlyAuthenticatedMicrosoftAccountClient the HTTP request constructed returns an error response

{"error":"invalid_client","error_description":"The provided request must include a 'client_secret' input parameter."}

the HTTP request:

https://login.live.com/oauth20_token.srf?redirect_uri=https://login.live.com/oauth20_desktop.srf&client_id=000000004C10F00C&scope=wl.skydrive_update&refresh_token=MCaltIV1E3qVfzZ7LouWOOkGx1U7KY259Yelh9AGrtVXKPj8m83SiTK02josso1JfFTIKzQUufXJOD7C7lSrKHYMM8VjEj2x4kF!iXoLxpvgPBC1TAL7g1bhXAemoWz3z624*iBH1mZJcS9HC9gjktA6FOKli7VaOUQLLEUQdshghwWNuqQvrr0oDwuTECR2OzauSny2WTtDsOjmKtlKeDFt3cU95uzA*pqge54iuOlTy!F95D7K4O61JUHwlslccqcLJUum3Kxb2qs!9UsXREySIYuPsJLdvyPWCo01OVuRwIHH4e9NrFy0EM3WqZGV2MIT*htFowrFlAnliKRnT1uTaRTZFrp3!3iXBz1f9amfy&grant_type=refresh_token

I added the client_secret to the request and it succeeded.

&client_secret=[redacted]

I noticed that GetSilentlyAuthenticatedMicrosoftAccountClient is passing a null for the ClientSecret parameter. Is this a Bug?

ginach commented 8 years ago

There's an overload of GetSilentlyAuthenticatedMicrosoftAccountClient that takes in a client secret that should be piping the secret through correctly. The overload that doesn't take secret is passing null. Are you sure you're calling the correct overload?

cdmayer commented 8 years ago

If this did not solve your issue please reopen.