Skip to content

Commit

Permalink
AddDataProtection
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Nov 8, 2023
1 parent ad66890 commit 58ba74d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion MyApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using System.Net;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Server;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.EntityFrameworkCore;
using ServiceStack.Blazor;
using MyApp.Components;
using MyApp.Data;
using MyApp.Identity;
using ServiceStack.Blazor;

var builder = WebApplication.CreateBuilder(args);

Expand All @@ -26,6 +27,8 @@
options.DefaultSignInScheme = IdentityConstants.ExternalScheme;
})
.AddIdentityCookies();
builder.Services.AddDataProtection()
.PersistKeysToFileSystem(new DirectoryInfo("App_Data"));

// $ dotnet ef migrations add CreateIdentitySchema
// $ dotnet ef database update
Expand Down

0 comments on commit 58ba74d

Please sign in to comment.