Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Release/v1.0.18 #617

Merged
merged 13 commits into from
Dec 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.17
v1.0.18
21 changes: 14 additions & 7 deletions app/services/tcAuth.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
function TcAuthService(CONSTANTS, auth, AuthTokenService, $rootScope, $q, $log, $timeout, UserService, Helpers, ApiService, store, $http) {
$log = $log.getInstance("TcAuthServicetcAuth");
var auth0 = auth;
var apiUrl = CONSTANTS.API_URL_V3;
var apiUrl = CONSTANTS.AUTH_API_URL;
var service = {
login: login,
socialLogin: socialLogin,
Expand Down Expand Up @@ -163,22 +163,29 @@
}

function logout() {
$http({
// options for DELETE http call
var logoutOptions = {
url: apiUrl + '/authorizations/1',
method: 'DELETE',
headers: {
'Authorization': "Bearer " + AuthTokenService.getV3Token()
}
}).then(function(res) {
$log.log('logout successful');
}).catch(function(resp) {
$log.error('logout error');
});
};


// logout of all browsers
return $q(function(resolve, reject) {
// remove local token
AuthTokenService.removeTokens();
$rootScope.$broadcast(CONSTANTS.EVENT_USER_LOGGED_OUT);
resolve();
// $http(logoutOptions).then(function(res) {
// $log.log('logout successful');
// resolve();
// }).catch(function(resp) {
// $log.error('logout error');
// reject();
// });
});
}

Expand Down