Open Closed

Deploying to the production (Login Error) #520


User avatar
1
alkaabi created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v3.3.0
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): yes

Hi,

I am facing a problem after deploying the application to the production environemnt. Basically, When I try to login into the application, I get redirected to the to the identity server login screen. I enter my credentials and I login successfully. After that Identity server redirects me back to the angular app main page but without showing any user information at the top bar (Login button is still visible). This means angular is not getting authenticated for some reason. In local development ennvironemt, everything is working fine. This only happnens when deploying the app into production environemnt.

You help is appreciated


14 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi

    Can you share some screenshots and error logs?

  • User Avatar
    0
    alkaabi created

    Here is a screenshot of the login process. There is no any log error in Identity server or angular application. You urgent help is much appreciated

    <br>

    <br> <br>

  • User Avatar
    0
    alkaabi created

    Here is a screenshot of identity logs. NO error is shown

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can help you remotely. My email: shiwei.liang@volosoft.com

  • User Avatar
    1
    gvnuysal created

    Hi @alkaabi I had the same problem too. my solution was as follows In IdentityServerClientRedirectUris I changed the redirect url address.I also changed the ClientUri information in the IdentityServerClients table. I typed the address of my iis client address.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    @gvnuysal

    Could you provide steps to reproduce? I will check it. thanks.

  • User Avatar
    0
    alkaabi created

    Hi,

    Our production server are not connected to the internet. However, I made a smilar environemnt and hosted the apps on IIS and I still get the same problem.

    How can you you help remotely ?? Via which app ?? Remote Desktop ?

  • User Avatar
    0
    alkaabi created

    Hi,

    I hosted the following on a sepearte IIS website (diffrent machines)

    1- Api.Host project using publish menu in VS (running under https) 2- IdentityServer project using publish menu in VS (running under https) 3- angular client (runnning under http)

    I have also changed Cors Oirgin urls in app settings to match Angular Client IIS addresses

  • User Avatar
    1
    alkaabi created

    Hi @gvnuysal,

    Thanks for your response. I did what you did without luck. In fact, I prevoisly modified IdentityServerClientRedirectUris table to include the angular client url but did not work. I have also modified ClientUri just like you said without luck. I have wasted too many hours trying to figure out what is wrong.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    You can send email to me. I will give you zoom meeting link.

  • User Avatar
    0
    GregB created

    I'm facing the same issue. I've just deployed my project to a staging server for my client to look at and I'm getting an Invalid Redirect URI error, but I can't see how or where I'm supposed to set it. The URL in the log is http, but all my settings are HTTPS so I don't know where it's coming from.

    Is there any documentation about deploying to a live environment and what changes you're supposed to make?

    Cheers, Greg

  • User Avatar
    0
    alkaabi created

    Hi @GregB

    Check baseUrl in envronemnt.prod.ts in Angular Client

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Did you solve this problem?

  • User Avatar
    0
    alkaabi created

    yes, I did..

    It was a silly mistake. In Host project App Setting file, there is an entry for AuthServer which had the wrong IP address (localhost). I entered the correct ip address and everything worked fine.

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