Ends in:
7 DAYS
23 HRS
49 MIN
19 SEC
Ends in:
7 D
23 H
49 M
19 S
Open Closed

Tenant-Id and Tenant-Name Not Set in Header After Dashboard Redirect (SSO OIDC) #8132


User avatar
0
Repunjay_TASC created
  • ABP Framework version: 8.0
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

We have a requirement where, when a client clicks on our application logo (which is already configured within their application), they should be redirected directly to the IdP's login page instead of the ABP.IO login page. After authentication with the IdP, the user should be redirected to our dashboard.

Using below ABP.IO support ticket i am successfully able to run POC project. Note :- Tenant not set in POC project.

https://abp.io/support/questions/7788/Custom-Redirection-to-third-party-IdP-Login-Page-and-Dashboard-Post-Authentication-in-ABPIO?CurrentPage=2

Error :- After integrating the same code into our existing project, we successfully authenticated with the IDP, added the user to the database, and were redirected to the dashboard. However, after a few seconds, the application automatically redirects to the logout page I have cross check log it's look like tenant not set that's why user not able to login.

For your refence please find below log

We need to set the tenant name and tenant ID headers for the dashboard redirect URL. How can we do this ?


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

    Please check the logs of the real API(api/account/my-profile) website.

  • User Avatar
    0
    Repunjay_TASC created

    Yes i am calling gateway api .

    this is base method right ?

    below API i have call from angular and token pass which is coming from 3rd party IDP.

    Which token need to pass this api ? ABP or 3rd party IDP. ?

    ???

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share a screenshot of your solution structure.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    bwt, the question has too many replies.

    Can you create a new question to reply?

    Thanks

  • User Avatar
    0
    Repunjay_TASC created

    This issue is escalating internally and is creating a bad impression with the client. I’ve been trying to convince the team to set up a call and resolve this. I completed the POC, and it works as expected, but we’re still facing issues with the actual implementation in the project, and the problem remains unresolved.

    With this communication, I’m unsure when we will resolve this issue.

    As I mentioned earlier, we have an old template with the updated version. Once you review the code, you’ll definitely be able to understand it and resolve the issue. For your information, the modifications we made earlier were done with the support of your team during the call.

  • User Avatar
    0
    Repunjay_TASC created

    hi

    Please share a screenshot of your solution structure.

    front-end, we’re using Angular, while on the back-end, we’re using microservices. At the database level, we’re using pgAdmin.

    I’ve also shared an email with a high-level structure screenshot and the OIDC code that I used on the Angular side. Please review it and let me know your thoughts.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Request starting "HTTP/2" "GET" "https"://"localhost:44359""""/api/account/my-profile""" - null null

    https://localhost:44359/api/account/my-profile is just forwarding the request, it is not the real API. When you see the 500 error, please check the logs of the real API to see the reason.

    The current logs are from 1️⃣ or 2️⃣, Check the logs of 3️⃣ (microservice)

    If you are unsure, please delete all websites' logs.txt files, reproduce the problem, and share all logs.txt files.

    Thanks

  • User Avatar
    0
    Repunjay_TASC created

    hi

    Request starting "HTTP/2" "GET" "https"://"localhost:44359""""/api/account/my-profile""" - null null

    https://localhost:44359/api/account/my-profile is just forwarding the request, it is not the real API.
    When you see the 500 error, please check the logs of the real API to see the reason.

    The current logs are from 1️⃣ or 2️⃣, Check the logs of 3️⃣ (microservice)

    If you are unsure, please delete all websites' logs.txt files, reproduce the problem, and share all logs.txt files.

    Thanks

    Hi , I know it's forward api and it's base method not able to debug as well what ever logs store in log.txt file i shared with you.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    The log does not contain the internal exception.

    The logs of this 500 error should exist on the project, which depends on the AbpAccountPublicApplicationModule(Volo.Abp.Account.Pro.Public.Application) module

    [14:10:09 INF] [] Request starting "HTTP/2" "GET" "https"://"localhost:44359""""/api/account/my-profile""" - null null
    [14:10:09 INF] [] CORS policy execution successful.
    [14:10:09 INF] [] Handling request: /api/account/my-profile
    [14:10:09 INF] [] Handling request logProject: product
    [14:10:09 INF] [] Handling request logProjectGroupName: /ecs/product-dev-gateway
    [14:10:09 INF] [] Handling request logProject change tenant: product
    [14:10:09 INF] [Product] Executing endpoint '"Volo.Abp.Account.ProfileController.GetAsync (Volo.Abp.Account.Pro.Public.HttpApi)"'
    [14:10:09 INF] [Product] Route matched with "{area = \"account\", controller = \"Profile\", action = \"Get\", page = \"\"}". Executing controller action with signature "System.Threading.Tasks.Task`1[Volo.Abp.Account.ProfileDto] GetAsync()" on controller "Volo.Abp.Account.ProfileController" ("Volo.Abp.Account.Pro.Public.HttpApi").
    [14:10:09 INF] [Product] Executed action "Volo.Abp.Account.ProfileController.GetAsync (Volo.Abp.Account.Pro.Public.HttpApi)" in 13.5452ms
    [14:10:09 INF] [Product] Executed endpoint '"Volo.Abp.Account.ProfileController.GetAsync (Volo.Abp.Account.Pro.Public.HttpApi)"'
    [14:10:09 INF] [] Finished handling request.
    [14:10:09 INF] [] Request finished "HTTP/2" "GET" "https"://"localhost:44359""""/api/account/my-profile""" - 500 null "application/json" 195.4187ms
    
  • User Avatar
    0
    Repunjay_TASC created

    bwt, the question has too many replies.

    Can you create a new question to reply?

    Thanks

    Hi ,

    As per your request i have created new ticket.

    https://abp.io/support/questions/8267/Tenant-Id-and-Tenant-Name-Not-Set-in-Header-After-Dashboard-Redirect-SSO-OIDC

    Kindly please assign your self .

    thanks

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06