Skip to content

CurrentUser claims duplicate #8053

Closed
Closed
@gerryge

Description

@gerryge
  • Your ABP Framework version.
    v4.2.2

  • Your User Interface type (Angular/MVC/React... etc.) if the issue is related to a specific UI
    Mvc

  • Your database provider(EF Core/MongoDB)
    EF core

  • Steps needed to reproduce the problem.

  1. abp new Acme.BookStore --tiered
  2. Change Acme.BookStore.Web/Pages/Index.cshtm to show the current user claims
@if (!CurrentUser.IsAuthenticated)
      {
          <a abp-button="Primary" href="~/Account/Login"><i class="fa fa-sign-in"></i> @L["Login"]</a>
      }
      else
      {
          <div>
              <h3>Current claims:</h3>
              <ul>
                  @foreach (var claim in CurrentUser.GetAllClaims().OrderBy(c => c.Type))
                  {
                      <li>@claim.Type: <strong>@claim.Value</strong></li>
                  }
              </ul>
          </div>
      }

Detail please see bellow screenshot:
image

I have also tried with not tiered template, it is not duplicate.
image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions