Git Product home page Git Product logo

Comments (13)

Rocket18 avatar Rocket18 commented on June 12, 2024 1

it's solve you problem
logOut() { this.oauthService.logOut(); return false; }

from angular-oauth2-oidc.

im1dermike avatar im1dermike commented on June 12, 2024

I just did some additional investigating... it does not look like angular-oauth2-oidc ever actually calls the logoutUrl I set to end the session. If I manually hit that URL I set this.oauthService.logoutUrl to be, it ends the session, but this library never calls that. Any idea why?

from angular-oauth2-oidc.

anoordende avatar anoordende commented on June 12, 2024

Try removing the id_token from your logoutUrl:
this.oauthService.logoutUrl = "https://login.microsoftonline.com/TENANT_ID_GUID/oauth2/logout";

from angular-oauth2-oidc.

songokudbz avatar songokudbz commented on June 12, 2024

I have the same problem. How did you fix this?

from angular-oauth2-oidc.

im1dermike avatar im1dermike commented on June 12, 2024

@songokudbz I used the following code to log out:

this.oauthService.logoutUrl = 'https://login.microsoftonline.com/TENANT_ID_GUID/oauth2/logout?post_logout_redirect_uri=HTTPS://MYAPP.COM';

logOut() {
    this.oauthService.logOut();
    window.location.href = this.oauthService.logoutUrl;
}

from angular-oauth2-oidc.

manfredsteyer avatar manfredsteyer commented on June 12, 2024

It should be called. Try to remove id_token={{id_token}} (which is legacy)

from angular-oauth2-oidc.

im1dermike avatar im1dermike commented on June 12, 2024

@manfredsteyer I tried removing it, but to no avail. I included it in the original post only because it was still in your documentation. I agree with you that it "should" be called, but, nonetheless, it's not. Not sure why you're closing this ticket...

from angular-oauth2-oidc.

manfredsteyer avatar manfredsteyer commented on June 12, 2024

Sorry for closing.

I did not manage to reproduce this. Perhaps you can try it with the new version 2 which just landed some minutes ago.

The sample app, committed here, can also do it, so perhaps it is a good idea to find out in which way its usage of the lib differs from the usage in your application.

If you can create a minimal demo-app that reproduces this issue, I'm happy to look over it.

from angular-oauth2-oidc.

mraible avatar mraible commented on June 12, 2024

Logout works for me. Here's the example app I'm using: https://developer.okta.com/blog/2017/04/17/angular-authentication-with-oidc

from angular-oauth2-oidc.

manfredsteyer avatar manfredsteyer commented on June 12, 2024

Discussion came to an end --> closing this. We can reopen it on demand.

from angular-oauth2-oidc.

iamvsaini avatar iamvsaini commented on June 12, 2024

@im1dermike Have you achieved that....? if yes please send sample code snippet for login and logout both, I am not getting the right way to do so. please help me out.

from angular-oauth2-oidc.

gzimh avatar gzimh commented on June 12, 2024

This is happening to me too, so if i refresh the page, call logout method the localStorage is cleaned but no redirection to endsession endpoint.

from angular-oauth2-oidc.

iamvsaini avatar iamvsaini commented on June 12, 2024

have you tried adal-angular6? @gzimh

from angular-oauth2-oidc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.