First reason would be to store the users in a diff...
# social
m
First reason would be to store the users in a different place but also with some custom settings. Member part is not used at all here
Is there a 24 days article or something about customizing the 9 version of identity 🙂
p
Not sure, what is it that you want to customize?
m
But my initial idea was to just slap on efcore and identity core
p
but why :p
m
To use a common database for users that is shared with other apps
but if you say it is already included, shouldn't the UI features also be possible without adding anything else?
p
we have custom UI in the backoffice for users and members
p
to replace backoffice users setup take a look at all the things to replace here
however
my advice, stick identity server infront of your old datasource
and use it as an external login service
m
Same for frontend I suppose?
this is just for fronend users
backend is not important for thsi
this
m
ok thanx I will look into this
p
members i'd be more tempted to do your own thing
no reason you can't just ignore what's there and register more identity instances
what went wrong when you tried to add your own identity setup?
again external login is an option for members
m
actually that was my initial plan
since members is not part of this, it is all external
i mean members will not be used at all in this particular solution
just verifying stuff with external db
p
just to be clear on what you mean by members
are you trying to get folks into the backoffice?
m
Umbraco Members
nope
frontend only
p
cool, so you could setup members with an external login provider
or just add your own UserManager etc
m
i could have gone the openid route but I just need something simple
that last part
my own usermanager
p
that should be fine
what went wrong
m
well not yet but i was trying to add the "UI" features and had problems with version conflicts
but since it already uses identity that explains it
i thought it still used the old stuff
just because it is a fast track to do it, I know I can do it manually 🙂
but your examples is a good starting point so I hope I can manage
p
we have references to Identity 6.0.0 5.0.11, there are two usermanagers (and associated dependencies) registered one for members one for backoffice users. There should be no reason you can't add a third 🙂
m
you mean net6 version?
could that be why I had problems. I used the net5
but from what you said. I can just add my own stores and managers here?
.AddUserStore<IUserStore, MemberUserStore>(factory => new MemberUserStore( factory.GetRequiredService(), factory.GetRequiredService(), factory.GetRequiredService(), factory.GetRequiredService(), factory.GetRequiredService(), factory.GetRequiredService(), factory.GetRequiredService() )) .AddRoleStore() .AddRoleManager()
sorry
m
Copy code
.AddUserStore<IUserStore<MemberIdentityUser>, MemberUserStore>(factory => new MemberUserStore(
                    factory.GetRequiredService<IMemberService>(),
                    factory.GetRequiredService<IUmbracoMapper>(),
                    factory.GetRequiredService<IScopeProvider>(),
                    factory.GetRequiredService<IdentityErrorDescriber>(),
                    factory.GetRequiredService<IPublishedSnapshotAccessor>(),
                    factory.GetRequiredService<IExternalLoginWithKeyService>(),
                    factory.GetRequiredService<ITwoFactorLoginService>()
                ))
                .AddRoleStore<MemberRoleStore>()
                .AddRoleManager<IMemberRoleManager, MemberRoleManager>()
p
it's probably easier to completely ignore all the umbraco members stuff and just add a new setup for a new user type
m
Ah ok
that was my initial plan actually 🙂
p
UmbracoMembers is all pretty coupled to the CMS, some data stored as CMS content etc
so you probably want to avoid our interfaces and classes
m
yes
that is how I did it before
unfortunatelly that was in v7 so my memory is a bit off here
anyway thanx for the help
p
sorry i had wrong branch checked out, we depend on identity 5.0.11 in v9
m
Then it makes sense 🙂