@@ -11,9 +11,9 @@ angular.module('topcoderX')
11
11
var GET_FRESH_TOKEN_SUCCESS = 'GET_FRESH_TOKEN_SUCCESS' ;
12
12
var GET_FRESH_TOKEN_FAILURE = 'GET_FRESH_TOKEN_FAILURE' ;
13
13
14
- var LOGOUT_REQUEST = 'LOGOUT_REQUEST' ;
15
- var LOGOUT_SUCCESS = 'LOGOUT_SUCCESS' ;
16
- var LOGOUT_FAILURE = 'LOGOUT_FAILURE' ;
14
+ // var LOGOUT_REQUEST = 'LOGOUT_REQUEST';
15
+ // var LOGOUT_SUCCESS = 'LOGOUT_SUCCESS';
16
+ // var LOGOUT_FAILURE = 'LOGOUT_FAILURE';
17
17
18
18
// local variables
19
19
var connectorIFrame , url , loading ;
@@ -148,14 +148,14 @@ angular.module('topcoderX')
148
148
AuthService . logout = function ( ) {
149
149
// send request to the server that we want to log out
150
150
// save loggingOut promise to be accessed any time
151
- AuthService . logginOut = proxyCall ( LOGOUT_REQUEST , LOGOUT_SUCCESS , LOGOUT_FAILURE ) . then ( function ( ) {
152
- AuthService . logginOut = null ;
153
- // remove only token V3, which we set from the script manually
154
- // token V2 will be removed automatically during logout server request
155
- $cookies . remove ( $rootScope . appConfig . JWT_V3_NAME , { path : '/' } ) ;
156
- } ) ;
157
-
158
- return AuthService . logginOut ;
151
+ // AuthService.logginOut = proxyCall(LOGOUT_REQUEST, LOGOUT_SUCCESS, LOGOUT_FAILURE).then(function () {
152
+ // AuthService.logginOut = null;
153
+ // remove only token V3, which we set from the script manually
154
+ // token V2 will be removed automatically during logout server request
155
+ // $cookies.remove($rootScope.appConfig.JWT_V3_NAME, { path: '/' });
156
+ // });
157
+ $window . location . href = $rootScope . appConfig . TC_LOGIN_URL + '?logout=true&retUrl=' + encodeURIComponent ( $window . location . href ) ;
158
+ // return AuthService.logginOut;
159
159
}
160
160
161
161
AuthService . login = function ( ) {
0 commit comments