Open Closed

Users name is not coming if I click the "login with this user" #5810


User avatar
0
fatih.ceylan@hitsoft.com.tr created

Hello.

I found something during my process. I logon with admin(with tenant). After that I clicked "login with user" from users.

Users name(defined in creating user) is not coming. I catch this on code side.

  • ABP Framework version: v6.0.2
  • UI Type: Angular r
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

7 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I don't understand this very well.

    Can you share some screenshots?

  • User Avatar
    0
    fatih.ceylan@hitsoft.com.tr created

    Hi. I am doing process my user information matchs with abp users informations. Abp users name is not coming in my code when I use currentTenenatUser.username (this code is for sample)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Abp users name is not coming in my code when I use currentTenenatUser.username (this code is for sample)

    Please check all claims get by CurrentUser.GetAllClaims. The username is set from claims.

  • User Avatar
    0
    fatih.ceylan@hitsoft.com.tr created

    Hello again.

    I tried specefication that you gave. But user's name is not came.

    I need Name to use as marked with blue color.

    These are datas comes with CurrentUser.GetAllClaims.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The claims are from 15 to 29. Can you share the whole list?

    Are you using the openiddict or identityserver?

  • User Avatar
    0
    fatih.ceylan@hitsoft.com.tr created

    Hello.

    Actually 1 to 29. But the other specifications are not connected with users name. I am using IdentityServer by the way.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Is there a GivenName claim?

    https://github.com/abpframework/abp/blob/dev/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpUserClaimsFactory.cs#L91

    You can add your custom AbpUserClaimsFactory as well.

    builder.Services.AddTransient<IUserClaimsPrincipalFactory<IdentityUser>, MyAbpUserClaimsFactory<IdentityUser>>();

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11