kopia lustrzana https://github.com/c9/core
logout redirects
rodzic
ef5af704cd
commit
15a3ed02ba
|
@ -107,20 +107,9 @@ define(function(require, exports, module) {
|
|||
}) || true;
|
||||
}
|
||||
|
||||
function logout(callback) {
|
||||
accessToken = "invalid";
|
||||
loggingIn = false;
|
||||
|
||||
http.request("/_auth/logout", function(err1) {
|
||||
http.request(ideBaseUrl + "/auth/signout", {
|
||||
method: "POST",
|
||||
withCredentials: true
|
||||
}, function(err2) {
|
||||
loggedIn = false;
|
||||
emit("logout", {uid: uid, newUid: ANONYMOUS});
|
||||
callback && callback(err1 || err2);
|
||||
});
|
||||
});
|
||||
function logout(redirect) {
|
||||
redirect = redirect || window.location.href;
|
||||
window.location.href = ideBaseUrl + "/auth/signout?redirect=" + encodeURIComponent(redirect);
|
||||
}
|
||||
|
||||
function createLoopDetector(count, duration) {
|
||||
|
|
|
@ -137,7 +137,7 @@ define(function(require, exports, module) {
|
|||
|
||||
function signout() {
|
||||
vfsEndpoint.clearCache();
|
||||
auth.logout(function() { location.href = ideBaseUrl; });
|
||||
auth.logout(ideBaseUrl);
|
||||
}
|
||||
|
||||
function onReLogin() {
|
||||
|
@ -147,9 +147,7 @@ define(function(require, exports, module) {
|
|||
"Please hit OK to reload the IDE.",
|
||||
function() {
|
||||
vfsEndpoint.clearCache();
|
||||
auth.logout(function() {
|
||||
document.location.reload();
|
||||
});
|
||||
auth.logout();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue