Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Update device code request to include device_code (#1359)
Browse files Browse the repository at this point in the history
* update device code request to include device_code

* changelog
  • Loading branch information
MarkZuber authored and jennyf19 committed Oct 26, 2018
1 parent 4a4996f commit da27ee5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/OAuth2/OAuthConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ internal class OAuth2Parameter
public const string RedirectUri = "redirect_uri";
public const string Resource = "resource";
public const string Code = "code";
public const string DeviceCode = "device_code";
public const string Scope = "scope";
public const string Assertion = "assertion";
public const string RequestedTokenUse = "requested_token_use";
Expand Down
5 changes: 5 additions & 0 deletions msal/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2.3.1-preview
=============
This release includes:
- Fix for device code flow where server is now expecting device_code as the body parameter.

2.3.0-preview
=============
This release includes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ private Dictionary<string, string> GetBodyParameters(DeviceCodeResult deviceCode
var dict = new Dictionary<string, string>
{
[OAuth2Parameter.GrantType] = OAuth2GrantType.DeviceCode,
[OAuth2Parameter.DeviceCode] = deviceCodeResult.DeviceCode,
// TODO: this is out of spec and the server is changing but for now to keep compatible
// across servers as the changes roll out, we're sending the device code both ways.
[OAuth2Parameter.Code] = deviceCodeResult.DeviceCode
};
return dict;
Expand Down

0 comments on commit da27ee5

Please sign in to comment.