-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very complex configuration #430
Comments
You are right, this configuration is maybe too complex. |
Yes, I will make a PR later when i finished it. |
This is great question, I would prefer separate keys for User and Role, maybe we can remove |
Yes, it's better to remove |
These objects are connected with |
Yes, I think, it does. But after looking to sources of Identity there are some questions. |
Can you send me which part do you mean? |
Yes, of course. |
You are right, thanks for this point. We should use only one key - TKey, becuase of this limitation. |
Hi @skoruba and @fatalistt, I was looking at this issue and associated PR and me too find that configuration is a bit complex and definitively there is TRoleKey and TUserKey type params too much. I find PR maybe a bit too big so maybe it's possible to split it in two, one for TRoleKey and TUserKey removal and another for simplified configuration? What do you think? Thank you |
Hi @b0 I definitely agree with you, I am happy for this PR, but it is too complex - splitting would be perfect. |
In
Startup.ConfigureServices
of Admin and AdminApi projects there are lots of Type parameters (Admin, for example).It's very difficult to understand, which parameter user should to change if he want to change something.
I suppose to create a builder to split this method. It'll look something like this:
In configuration we start from default values, so user can skip some blocks like
ConfigureKeys
.I start to making this, but I have some question for now (may be I'll add some more later):
In
Skoruba.IdentityServer4.Admin.EntityFramework.Identity.Repositories.IdentityRepository
you haveTUserKey
,TRoleKey
, andTKey
parameters (src).TUserKey
andTRoleKey
are never used except these 2 methods:ConvertUserKeyFromString
andConvertRoleKeyFromString
All other parameters are depend from
TKey
(TUser : IdentityUser<TKey>
, for example).Later you use
UserManager<IdentityUser<TKey>>.Users.AnyAsync(x => x.Id.Equals(_instance of TUserKey_));
here.If
TKey
andTUserKey
will be a different types, this code will fall, isn't it?The text was updated successfully, but these errors were encountered: