8000 IdentityBuilderExtensions check null, then uses null value · Issue #22 · giorgos07/Daarto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
IdentityBuilderExtensions check null, then uses null value #22
Open
@mcshaz

Description

@mcshaz

The line

if (roleType != null) {
   ...
} else {
   services.TryAddScoped(
                    typeof(IUsersOnlyTable<,,,,>).MakeGenericType(userType, keyType, userClaimType, userLoginType, userTokenType),
                    typeof(UsersTable<,,,,,>).MakeGenericType(userType, keyType, userClaimType, roleType, userLoginType, userTokenType)

will throw an error if roleType is null because roleType is used as an argument in the second call to the MakeGenericType method

I believe the second call should use the userRoleType as the 4th argument, not rollType

typeof(UsersTable<,,,,,>).MakeGenericType(userType, keyType, userClaimType, userRoleType, userLoginType, userTokenType)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0