File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
4-WebApp-your-API/Client/Controllers
Microsoft.Identity.Web/Client/TokenCacheProviders/Sql Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11using Microsoft . AspNetCore . Http ;
22using Microsoft . AspNetCore . Mvc ;
3+ using Microsoft . Identity . Web . Client ;
34using System . Collections . Generic ;
45using System . Threading . Tasks ;
56using TodoListClient . Services ;
@@ -18,6 +19,7 @@ public TodoListController(ITodoListService todoListService)
1819 }
1920
2021 // GET: TodoList
22+ //[MsalUiRequiredExceptionFilter(ScopeKeySection = "TodoList:TodoListScope")]
2123 public async Task < ActionResult > Index ( )
2224 {
2325 return View ( await _todoListService . GetAsync ( ) ) ;
Original file line number Diff line number Diff line change @@ -90,7 +90,10 @@ public static IServiceCollection AddSqlPerUserTokenCache(this IServiceCollection
9090 //var tokenCacheDbContext = new TokenCacheDbContext(tokenCacheDbContextBuilder.Options);
9191 //tokenCacheDbContext.Database.EnsureCreated();
9292
93- services . AddDataProtection ( ) ;
93+ // To share protected payloads among apps, configure SetApplicationName in each app with the same value.
94+ // https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-2.2#setapplicationname
95+ services . AddDataProtection ( )
96+ . SetApplicationName ( "WebApp_Tutorial" ) ;
9497
9598 services . AddDbContext < TokenCacheDbContext > ( options =>
9699 options . UseSqlServer ( sqlTokenCacheOptions . SqlConnectionString ) ) ;
You can’t perform that action at this time.
0 commit comments