Skip to content

Commit 480c934

Browse files
committed
Merge branch 'develop'
2 parents 12626ed + 850aac1 commit 480c934

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

www/coffee/lib/oauth.coffee

+3
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ module.exports = (window, document, jQuery, navigator) ->
193193
opts.callback new Error("unable to receive token")
194194
defer?.reject new Error("unable to receive token")
195195
return
196+
wnd.addEventListener "exit", () ->
197+
defer?.reject new Error("The popup was closed")
198+
opts.callback new Error("The popup was closed") if opts.callback and typeof opts.callback == "function"
196199

197200
return defer?.promise()
198201
clearCache: (provider) ->

www/dist/oauth.js

+8
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,14 @@ module.exports = function(window, document, jQuery, navigator) {
249249
}
250250
}
251251
});
252+
wnd.addEventListener("exit", function() {
253+
if (defer != null) {
254+
defer.reject(new Error("The popup was closed"));
255+
}
256+
if (opts.callback && typeof opts.callback === "function") {
257+
return opts.callback(new Error("The popup was closed"));
258+
}
259+
});
252260
return defer != null ? defer.promise() : void 0;
253261
},
254262
clearCache: function(provider) {

www/dist/oauth.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/js/lib/oauth.js

+8
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ module.exports = function(window, document, jQuery, navigator) {
240240
}
241241
}
242242
});
243+
wnd.addEventListener("exit", function() {
244+
if (defer != null) {
245+
defer.reject(new Error("The popup was closed"));
246+
}
247+
if (opts.callback && typeof opts.callback === "function") {
248+
return opts.callback(new Error("The popup was closed"));
249+
}
250+
});
243251
return defer != null ? defer.promise() : void 0;
244252
},
245253
clearCache: function(provider) {

0 commit comments

Comments
 (0)