0

We are developed the app engine application. In that we used the openid4java to login from the google/yahoo. Its working for login where as not for logout. The google/yahoo sessions are not cleared form this openid4java.

When i searched i came to know that, this is not possible form openid. Please suggest on this is there any other way to logout from global session(google/yahoo).

Thanks in advance.

Thanks, Govind.

brenjt
  • 15,997
  • 13
  • 77
  • 118
Govind
  • 111
  • 8

2 Answers2

0

OpenID specification doesn't have a Single Logout profile. Therefor most of the OpenID Providers would not support this unless if they have implemented it in their own way. Try clearing cookies, that might work.

SureshAtt
  • 1,891
  • 2
  • 17
  • 22
0

Google logout:

function googleLogout() {
    window.open( 'https://www.google.com/accounts/Logout' );
    alert( 'logged out from google.' );
}


Yahoo logout:

function yahooLogout() {
    window.open( 'https://login.yahoo.com/config/login?logout=1' );
    alert( 'logged out from yahoo' );
}


Bonus - Facebook logout:

function facebookLogout() {
    FB.getLoginStatus(function(response) {
        if( response.status === 'connected' ) {
            logoutFromFB();
        }
        else {
            alert( 'already logged out from facebook');
        }
    }, true);
}

function logoutFromFB() {
    FB.logout(function(response) {
        alert( 'logged out from facebook' );
    });
}
lupchiazoem
  • 8,026
  • 6
  • 36
  • 42