Open Closed

Resource Owner Password Flow logout redirects to incorrect login url #5218


User avatar
0
krapholo created

If you're creating a bug report, please include the followings:

  • ABP Framework version: v7.2.2

  • UI type: Angular

  • DB provider: EF Core

  • Identity Server Separated (Angular): Yes

  • Exception message and stack trace:
    We picked up the below error:
    image.png
    which seems to originate from here:
    image.png
    is there a configuration to maybe set the return URL? we tried setting the identity post-logout URL but that also does not work.

  • Steps to reproduce the issue:"

  1. Open the home page on http://localhost:4200/

  2. Click on the login lint which navigates the user to http://localhost:4200/account/login

  3. Enter the user name and password then click login which navigates the user back to http://localhost:4200/

  4. Click logout which navigates the user to https://localhost:44336/Account/Login instead of http://localhost:4200/account/login

environment.ts file sample

import { Environment } from '@abp/ng.core';

const baseUrl = 'http://localhost:4200';

const oAuthConfig = {
  issuer: 'https://localhost:44336/',
  redirectUri: baseUrl,
  clientId: 'MyApp_App',
  dummyClientSecret: '1q2w3e*',
  scope: 'offline_access MyApp',
  showDebugInformation: true,
  oidc: false,
  requireHttps: true,
};

export const environment = {
  production: false,
  application: {
    baseUrl,
    name: 'MyApp',
  },
  oAuthConfig,
  apis: {
    default: {
      url: 'https://localhost:44360',
      rootNamespace: 'MyApp',
    },
    AbpAccountPublic: {
      url: oAuthConfig.issuer,
      rootNamespace: 'MyApp',
    },
  },
} as Environment;


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

    hi krapholo

    Can you share your project with me?

    liming.ma@volosoft.com

    I will check it on my local.

  • User Avatar
    0
    krapholo created

    Hi @maliming,
    I can't give you access to our project it's against our company policy. I have setup an abp project using Identity server instead of OpenIddict on version 7.2.2 with an Angular UI and Lepton theme same as our project and I was able to reproduce the issue and emailed that to you. Please le me know ince you have download the project so that I can remove it, also note that you will need to install the packages on the angular project because I excluded these to save to reduce the size.

  • User Avatar
    0
    mahmut.gundogdu created

    Hi @maliming,
    I can't give you access to our project it's against our company policy. I have setup an abp project using Identity server instead of OpenIddict on version 7.2.2 with an Angular UI and Lepton theme same as our project and I was able to reproduce the issue and emailed that to you. Please le me know ince you have download the project so that I can remove it, also note that you will need to install the packages on the angular project because I excluded these to save to reduce the size.

    (Actually, @maliming discovered it.) We have fixed. The OAuth library does not redirect to the server side when you give a parameter with the value true. I implemented that in the repository, but there is a temporary fix till the patch released. I have tested it works with lepton and identity-server.

    here the code.

    1- create a service class and extend from AbpOAuthService and call logout with true as any

     @Injectable({
      providedIn: 'root',
    })
    export class MyAuthService  extends AbpOAuthService {
      logout(){
        return super.logout(true as any);
      }
    }
    
    

    then provide it in app.module.ts

    
    @NgModule({
        //...
      // all detail removed for clearity
      providers: [
      //...
        {
          provide: AuthService,
          useClass: MyAuthService, // <- your new class
        },
      ],
    })
    export class AppModule {}```
    
  • User Avatar
    0
    krapholo created

    Hi,
    fixed worked on our side also.
    I'm closing the ticket thanks.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on June 05, 2025, 07:31