Skip to content

Commit c7e44e7

Browse files
author
James Cori
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents c66e637 + 8c5f3e7 commit c7e44e7

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"ADMIN_TOOL_URL": "https://api.topcoder-dev.com/v2",
4343
"API_VERSION_PATH": "v3",
4444
"COOKIES_SECURE": false,
45-
"AUTH_URL": "https://accounts.topcoder-dev.com/member",
46-
"ACCOUNTS_CONNECTOR_URL": "https://accounts.topcoder-dev.com/connector.html",
45+
"AUTH_URL": "https://accounts-auth0.topcoder-dev.com",
46+
"ACCOUNTS_CONNECTOR_URL": "https://accounts-auth0.topcoder-dev.com",
4747
"JWT_V3_NAME": "v3jwt",
4848
"JWT_V2_NAME": "tcjwt",
4949
"OAUTH2_TOKEN_NAME": "oa2spigit",
@@ -118,8 +118,8 @@
118118
"ADMIN_TOOL_URL": "https://api.topcoder.com/v2",
119119
"API_VERSION_PATH": "v3",
120120
"COOKIES_SECURE": false,
121-
"AUTH_URL": "https://accounts.topcoder.com/member",
122-
"ACCOUNTS_CONNECTOR_URL": "https://accounts.topcoder.com/connector.html",
121+
"AUTH_URL": "https://accounts-auth0.topcoder.com",
122+
"ACCOUNTS_CONNECTOR_URL": "https://accounts-auth0.topcoder.com",
123123
"JWT_V3_NAME": "v3jwt",
124124
"JWT_V2_NAME": "tcjwt",
125125
"OAUTH2_TOKEN_NAME": "oa2spigit",

src/app/auth/auth.service.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ angular.module('supportAdminApp')
148148
*
149149
* @return {Promise} promise which is resolved when user is logged out on the server
150150
*/
151-
AuthService.logout = function() {
151+
/* AuthService.logout = function() {
152152
// send request to the server that we want to log out
153153
// save logginOut promise to be accessed any time
154154
AuthService.logginOut = proxyCall(LOGOUT_REQUEST, LOGOUT_SUCCESS, LOGOUT_FAILURE).then(function() {
@@ -159,6 +159,10 @@ angular.module('supportAdminApp')
159159
$cookies.remove(JWT_V3_NAME);
160160
161161
return AuthService.logginOut;
162+
} */
163+
164+
AuthService.logout = function () {
165+
$window.location.href = AUTH_URL + '?logout=true&retUrl=' + encodeURIComponent($window.location.href);
162166
}
163167

164168
AuthService.login = function() {
@@ -229,7 +233,7 @@ angular.module('supportAdminApp')
229233
* @return {Boolean} true if token V3 is expired
230234
*/
231235
AuthService.isTokenV3Expired = function() {
232-
return !AuthService.getTokenV3() || jwtHelper.isTokenExpired(AuthService.getTokenV3(), 300);
236+
return !AuthService.getTokenV3() || jwtHelper.isTokenExpired(AuthService.getTokenV3(), 10);
233237
}
234238

235239
/**

0 commit comments

Comments
 (0)