From 84612050c757aacf2eaa3868de80ede6a4551eb0 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 15 Feb 2017 15:01:27 -0700 Subject: [PATCH] logout works --- oauth3.implicit.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/oauth3.implicit.js b/oauth3.implicit.js index a3cf522..6453fb3 100644 --- a/oauth3.implicit.js +++ b/oauth3.implicit.js @@ -646,13 +646,15 @@ , reuseWindow: opts.broker && '-broker' , debug: opts.debug } - ).then(function (tokens) { - if (tokens.error) { + ).then(function (params) { + OAUTH3._browser.closeFrame(params.state || opts._state, opts); + + if (params.error) { // TODO directives.audience - return OAUTH3.PromiseA.reject(OAUTH3.utils._formatError(directives.issuer /*providerUri*/, tokens)); + return OAUTH3.PromiseA.reject(OAUTH3.utils._formatError(directives.issuer /*providerUri*/, params)); } - return tokens; + return params; }); }