Open Closed

Error when accessing the URL https://{domain.host}/Account/Login and the user was already logged in #1518


User avatar
0
Leonardo.Willrich created

When the user is already logged in in the application, but he access the link https://{domain.host}/Account/Login, it is showing the error below:

It is happening because we have another application which has a link to the login page.


4 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Please help me to understand the scenario better.

    • You have separate identityserver published to https://{domain.host}.
    • You have multiple applications trying to login to same identityserver.
    • One of them throws Invalid login request error when trying to login. Is this correct?

    It is happening because we have another application which has a link to the login page.

    Is the application you get the error is an abp application?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Can you share the application logs and how we reproduce it?

  • User Avatar
    0
    Leonardo.Willrich created

    Please help me to understand the scenario better.

    • You have separate identityserver published to https://{domain.host}.
    • You have multiple applications trying to login to same identityserver.
    • One of them throws Invalid login request error when trying to login. Is this correct?

    It is happening because we have another application which has a link to the login page.

    Is the application you get the error is an abp application?

    Hi @gterdem,

    The scenario is simpler than that. I have a portal website (it is not an application, only the company web site) which has a link to the application and it is redirecting straightaway to the login page. My full url is (https://admin.host.outagereporter.net/Account/Login).

    So, when the user has already logged minutes before and he has a valid session token, it is showing that error instead of showing the login page. If I redirect the user to https://admin.host.outagereporter.net/, if the user is already logged it will access the application straightaway, but if he is not logged, it will redirect to the login page. However, I want to redirect to the {host}/Account/Login to avoid to load the Blazor page before to get direct to the login page, it takes too much time.

    -- Edited: (After added my log, I am not able to add an answer or close this question)

    HI,

    I found the issue. I've noticed that that was only hapenning in my production environment. In my development environment it was working. So, I saw that there is variable in Login.cshtml.cs and Login.cshtml page called EnableLocalLogin. It read the Settings for "Abp.Account.EnableLocalLogin" with is a boolean (True/False). For the current tenant logged, this setting was false in the database. I just have deleted that line and it is working.

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Glad to hear your problem is solved. Closing the issue. Feel free to create a new one whenever you need.

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