Skip to content

Commit 04566ab

Browse files
cristiz1992kevinchalet
authored andcommitted
Fix the Dropbox provider to use POST instead of GET for userinfo retrieval
1 parent 1fd29d1 commit 04566ab

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

samples/Mvc.Client/Startup.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ public void ConfigureServices(IServiceCollection services)
4242
options.ClientId = "49e302895d8b09ea5656";
4343
options.ClientSecret = "98f1bf028608901e9df91d64ee61536fe562064b";
4444
options.Scope.Add("user:email");
45+
})
46+
47+
.AddDropbox(options =>
48+
{
49+
options.ClientId = "jpk24g2uxfxe939";
50+
options.ClientSecret = "qbxvkjk5la7mjp6";
4551
});
4652

4753
services.AddMvc();

src/AspNet.Security.OAuth.Dropbox/DropboxAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public DropboxAuthenticationHandler(
3232
protected override async Task<AuthenticationTicket> CreateTicketAsync([NotNull] ClaimsIdentity identity,
3333
[NotNull] AuthenticationProperties properties, [NotNull] OAuthTokenResponse tokens)
3434
{
35-
var request = new HttpRequestMessage(HttpMethod.Get, Options.UserInformationEndpoint);
35+
var request = new HttpRequestMessage(HttpMethod.Post, Options.UserInformationEndpoint);
3636
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
3737
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", tokens.AccessToken);
3838

0 commit comments

Comments
 (0)