Starts in:
3 DAYS
2 HRS
16 MIN
55 SEC
Starts in:
3 D
2 H
16 M
55 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

    hi

    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

    Can you share full debug logs(Logs.txt) during this process?

    liming.ma@volosoft.com

    Thanks

  • User Avatar
    0
    Repunjay_TASC created

    Hi

    I have shared log information over email please check.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share the full logs.

    You can change the log level and share the logs.txt file after reproducing the problem.

    public class Program
    {
        public async static Task<int> Main(string[] args)
        {
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
                .Enrich.FromLogContext()
                .WriteTo.Async(c => c.File("Logs/logs.txt"))
                .WriteTo.Async(c => c.Console())
                .CreateLogger();
    

  • User Avatar
    0
    Repunjay_TASC created

    ok

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks.

  • User Avatar
    0
    Repunjay_TASC created

    Sorry for late update, I have shared log information and screen shot as well over email please check.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks. I will check it.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The backend error is System.OperationCanceledException: The operation was canceled.

    Which means the browser cancels the request.

    Does your angular app use https? is the https certificate valid?

    https://localhost:4200/

  • User Avatar
    0
    Repunjay_TASC created

    hi

    The backend error is System.OperationCanceledException: The operation was canceled.

    Which means the browser cancels the request.

    Does your angular app use https? is the https certificate valid?

    https://localhost:4200/

    This issue is occurring only in the local not present development environment. In Dev after redirect URL to dashboard in header missing Tenant-Id and Tenant-Name; let me try to reproduce same issue in local get back to you.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok

  • User Avatar
    0
    Repunjay_TASC created

    shared log information and screen shot as well over email please check.

  • User Avatar
    0
    Repunjay_TASC created

    Any update ?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a project to reproduce?

    I will download and check it.

    liming.ma@volosoft.com

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Does your angular app use https? is the https certificate valid?

    https://localhost:4200/ http://localhost:4200/

  • User Avatar
    0
    Repunjay_TASC created

    My project is very large, and due to policy restrictions, it's not feasible to share the code.

    Can you setup a call we can connect ?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Maybe this is the HTTPS problem.

    Does your angular app use HTTPS? is the HTTPS certificate valid?

    https://localhost:4200/ http://localhost:4200/

  • User Avatar
    0
    Repunjay_TASC created

    Yes, we have a valid HTTPS certificate. Locally, we run the application over HTTP, while in the DEV and higher environments, we use HTTPS only. I shared all the logs, which are from the local environment, which is why they show HTTP.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Can you try to use HTTP in the DEV and higher environments to see if the error still exists?

  • User Avatar
    0
    Repunjay_TASC created

    Hi,

    It’s not a good idea because everyone using the development environment, and it will affect the existing code.

    I shared the recent logs; did you notice any HTTP or HTTPS-related issues? I agree locally application run HTTP only but haven't seen any Issue.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    The error only happens on HTTPS:\\localhost:4200, so I think this is a HTTPS problem. and chrome also show net::ERR_ SSL_PROTOCOL_ERROR

  • User Avatar
    0
    Repunjay_TASC created

    The error only happens on HTTPS:\\localhost:4200, so I think this is a HTTPS problem. and chrome also show net::ERR_ SSL_PROTOCOL_ERROR

    this is earlier log after that i shared one more email, can you pls check recent one

  • User Avatar
    0
    Repunjay_TASC created

    I have just forward to you one more time please check .

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share an online URL to reproduce this?

    I will test it online.

    The log still shows that the request was canceled.

    Thanks.

  • User Avatar
    0
    Repunjay_TASC created

    ok

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks, include a user and password.

    liming.ma@volosoft.com

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