Open Closed

Authentication Cookie is not being saved on Angular application #8139


User avatar
0
gabriel.pedroso created
  • Template: microservice
  • Created ABP Studio Version: 0.8.2
  • UI Framework: angular
  • Theme: leptonx
  • Theme Style: system
  • Database Provider: ef
  • Database Management System: sqlserver
  • Mobile Framework: none
  • Public Website: No
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: There are no exceptions. The cookie is just not being saved, and because of that, we can't log in to the application. The solution works fine locally; it just doesn't work when deployed to the Kubernetes environment.
  • Steps to reproduce the issue:
  • Go to the Angular application, ex: https://angular.yourwebsite.com
  • Click on the logging button
  • You will be redirected to https://auth.yourwebsite.com
  • Input a valid user and password and click on the Login button
  • You should be authenticated and redirected to the https://angular.yourwebsite.com URL
  • Then in here, ideally you should be authenticated and able to navigate to the authenticated pages, but it's not
  • Checking the cookies on the locally run application, I can see that the .AspNetCore.Identity.Application cookie is being saved, but I can't see that on the published website at https://angular.yourwebsite.com, even though it's saving the cookie on https://auth.yourwebsite.com so if you click on the Log in button again it will detect that you are authenticated and redirect you back

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

    hi

    Please share the logs.txt of https://auth.yourwebsite.com during the Steps to reproduce

    liming.ma@volosoft.com

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I see the log: [14:04:28 INF] AuthenticationScheme: Identity.Application signed in.

    Can you share an online website? I will test it online.

    Thanks

  • User Avatar
    0
    gabriel.pedroso created

    Hi, yes, you can use the same URL from the logs: https://klir-sandbox-microservices-angular.klir.com/

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    the angular can use the access_token to get application configuration

    Can you share the logs for https://klir-sandbox-microservices-webgateway.klir.com/api/abp/application-configuration?

    The logs you have shared don't include it.

    Thanks

Made with ❤️ on ABP v9.1.0-preview. Updated on October 22, 2024, 09:35