Merge pull request #5743 from sbwalker/dev
hack to get Passkeys working
This commit is contained in:
@ -84,11 +84,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
options.Cookie.HttpOnly = true;
|
||||
});
|
||||
|
||||
services.AddIdentityCore<IdentityUser>(options =>
|
||||
{
|
||||
// must be set prior to AddEntityFrameworkStores
|
||||
options.Stores.SchemaVersion = IdentitySchemaVersions.Version3;
|
||||
})
|
||||
services.AddIdentityCore<IdentityUser>(options => { })
|
||||
.AddEntityFrameworkStores<TenantDBContext>()
|
||||
.AddSignInManager()
|
||||
.AddDefaultTokenProviders()
|
||||
|
||||
@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Oqtane.Databases.Interfaces;
|
||||
using Oqtane.Extensions;
|
||||
using Oqtane.Infrastructure;
|
||||
@ -42,6 +43,14 @@ namespace Oqtane.Repository
|
||||
{
|
||||
optionsBuilder.ReplaceService<IMigrationsAssembly, MultiDatabaseMigrationsAssembly>();
|
||||
|
||||
// specify the SchemaVersion for .NET Identity as it is not being persisted when using AddIdentityCore()
|
||||
var services = new ServiceCollection();
|
||||
services.AddIdentityCore<IdentityUser>(options =>
|
||||
{
|
||||
options.Stores.SchemaVersion = IdentitySchemaVersions.Version3;
|
||||
});
|
||||
optionsBuilder.UseApplicationServiceProvider(services.BuildServiceProvider());
|
||||
|
||||
if (string.IsNullOrEmpty(_connectionString))
|
||||
{
|
||||
Tenant tenant = _tenantManager.GetTenant();
|
||||
|
||||
Reference in New Issue
Block a user