logout isn't working properly in angular-auth-oidc-client

Discussão em 'Angular' iniciado por b.g, Dezembro 29, 2024.

  1. b.g

    b.g Guest

    I'm using angular-auth-oidc-client to handle authentication proccess using microsoft identity provider I want to log in app and use the token generated in another app without requiring login again, it works fine in login step but when i try to log out the list of accounts that shown in logout popup doesn't include the account I already signed in with. when I debug I found the service

    this.oidcService.logoff().subscribe(res=>{
    this.accountService.logout();


    })


    isn't going to subscription this is my config module

    @NgModule({
    imports: [
    AuthModule.forRoot({
    config: {
    authority: 'https://login.microsoftonline.com/common/v2.0',
    authWellknownEndpointUrl: 'https://login.microsoftonline.com/common/v2.0',
    redirectUrl: `${window.location.origin}/complete`,
    clientId: "ddef7c5f-0fe0-4629-a8d4-7dea807f8711",
    scope: 'openid profile offline_access user.read',
    responseType: 'code',
    silentRenew: false,
    maxIdTokenIatOffsetAllowedInSeconds: 2800,
    issValidationOff: true,
    autoUserInfo: false,
    postLogoutRedirectUri: `${window.location.origin}/login`,
    silentRenewUrl: window.location.origin + '/silent-renew.html',
    useRefreshToken: true,
    logLevel: LogLevel.Debug,
    customParamsAuthRequest: {
    prompt: 'select_account', // login, consent
    },



    },
    }),
    ],
    providers: [{ provide: AbstractSecurityStorage, useClass: LocalStorageService }],
    exports: [AuthModule],
    })


    I'm not fully aware of how it works Thanks in advance.

    Continue reading...

Compartilhe esta Página