hack to get Passkeys working

This commit is contained in:
sbwalker
2025-10-22 16:39:52 -04:00
parent ac9b7a60fd
commit cf3a86dc4a
2 changed files with 10 additions and 5 deletions

View File

@ -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();