Skip to content

Commit 9ae8125

Browse files
author
trwalke
committed
Changing redirect URI to https://login.microsoftonline.com/common/oauth2/nativeclient Via the new WithDefaultRedirectUri() method.
Updating the read me
1 parent 0c27122 commit 9ae8125

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

1. Desktop app calls Web API/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ If you want to register your apps manually, as a first step you'll need to:
164164
- Select **Register** to create the application.
165165
1. On the app **Overview** page, find the **Application (client) ID** value and record it for later. You'll need it to configure the Visual Studio configuration file for this project (`ida:ClientId` in `TodoListClient\App.Config`).
166166
1. From the app's Overview page, select the **Authentication** section.
167-
1. In the **Redirect URIs** list, select for **TYPE** Public client (mobile & desktop). Then paste this value **urn:ietf:wg:oauth:2.0:oob** in the **REDIRECT URI** column.
167+
1. In the **Redirect URIs** list, under **Suggested Redirect URIs for public clients (mobile, desktop)** check the box next to **https://login.microsoftonline.com/common/oauth2/nativeclient**.
168168
1. Select **Save**.
169169
1. Select the **API permissions** section
170170
- Click the **Add a permission** button and then,

1. Desktop app calls Web API/TodoListClient/MainWindow.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public MainWindow()
7575
InitializeComponent();
7676
_app = PublicClientApplicationBuilder.Create(ClientId)
7777
.WithAuthority(Authority)
78+
//Sets the default redirect URI to https://login.microsoftonline.com/common/oauth2/nativeclient for .NET Framework
79+
.WithDefaultRedirectUri()
7880
.Build();
7981

8082
TokenCacheHelper.EnableSerialization(_app.UserTokenCache);

0 commit comments

Comments
 (0)