JudahGabriel / RavenDB.Identity

RavenDB Identity provider for ASP.NET Core. Let RavenDB manage your users and logins.
https://www.nuget.org/packages/RavenDB.Identity/1.0.0
MIT License
61 stars 29 forks source link

UserStore<T>MigrateToV6() does not work for DocumentStore with Conventions.FindCollectionName set #11

Closed abremora closed 5 years ago

abremora commented 5 years ago

We initialize our stores like that, because we feel it is more natural:

var store = new DocumentStore {
    Certificate = clientCertificate,
    Urls = new[] { url },
    Database = database,
    Conventions = {
        FindCollectionName = t => t.Name,
        UseOptimisticConcurrency = useOptimisticConcurrency
    }
};
store.Initialize();

So our documents start with IdentityUserByUserName/. But in UserStore.MigrateToV6() the document prefix is hard coded:

https://github.com/JudahGabriel/RavenDB.Identity/blob/663c3fb7b754d0af23d45b7aee1f5f588db488c3/RavenDB.Identity/UserStore.cs#L806

Maybe the best would be an overloaded method to set the prefix manually.

JudahGabriel commented 5 years ago

This is fixed and merged.