Open Closed

currentuser not get phone_number #8905


User avatar
0
heshengli created
  • ABP Framework version: v7.2.2

  • UI Type: Blazor Server

  • Database System: PostgreSQL

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

  • Exception message and full stack trace:

  • Steps to reproduce the issue:
    image.png
    image.png
    auth 44322 ,claim 有phone_number,但是blazor 和api 都获取不到
    Blazor 和Api 添加了引用

      <PackageReference Include="Volo.Abp.Http.Client.Web" Version="8.3.4" />
      <PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="8.3.4" />
    

3 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, after setting the phone_number in the account manage page, did you logout and then re-login? This is needed to refresh the claims if you are not using dynamic claims.

    Can you logout and then re-login and see if the claims are listed as expected?

    Regards.

  • User Avatar
    0
    heshengli created

    <PackageReference Include="Volo.Abp.Http.Client.Web" Version="7.2.2" />
    <PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="7.2.2" />

    7.2.2 UseAbpClaimsMap , not dynamic claims,
    CurrentUser.GetAllClaims() not phone_number

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    <PackageReference Include="Volo.Abp.Http.Client.Web" Version="7.2.2" />
    <PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="7.2.2" />

    7.2.2 UseAbpClaimsMap , not dynamic claims,
    CurrentUser.GetAllClaims() not phone_number

    Can you logout and then re login to see if claims are refreshed? I have tried just before and it seems there is no problem.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08