Open Closed

Microservices Pro with Auth Server and Angular Frontend. Login issue in frontend #8318


User avatar
0
christian@laekkerai.com created

So we require our users on every page of our angular app to be logged in. So when we connect the angular frontend to the auth server and require a login, we get redirected to the auth server, the user can log in and gets a valid and correctly signed token back. But then there is an error in processing the token content in the abp stack. and we can't debug where it happens.

  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: 401/redirect loop in angular frontend.
1. be on angular app
2. go to login
3. log in
4. get redirected to angular app with valid token
5. token information is stored in local storage
6. ???
7. token information is deleted and user is not logged in/after refreshing page, all the information is lost
  • Steps to reproduce the issue:
  1. Create an angular frontend with your cli (v7.3.2), pro or community doesn't matter, both have this issue.
  2. Connect the app to the auth server
const oAuthConfig = {
  issuer: 'https://intg-identity.laekkerai.app/',
  redirectUri: baseUrl,
  clientId: 'Angular',
  responseType: 'code',
  scope: 'offline_access openid address profile email phone roles Laekkerai',
  requireHttps: true,
  clearHashAfterLogin: false,
  showDebugInformation: true
};
  1. start angular app
  2. open dev tools
  3. log in
  4. enter credentials:
    1. tenant: abp-team
    2. username: abp-test
    3. password: 1q2w3E*
  5. open dev tools and see user is still not authenticated

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

    Hi,

    I think this is related to your backend.

    could you share a test project with me, I will check it. shiwei.liang@volosoft.com

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08