diff --git a/navigator.auth.js b/navigator.auth.js index 8f95e7f..cc8038f 100644 --- a/navigator.auth.js +++ b/navigator.auth.js @@ -7,7 +7,7 @@ function create(myOpts) { // TODO pre-generate URL // deliver existing session if it exists - var scope = opts && (opts.scope || opts.claims || []); + var scope = opts && (opts.scope || opts.claims || myOpts.scope || myOpts.claims || []); if (myOpts.session) { if (!scope.length || scope.every(function (scp) { return -1 !== opts.myOpts.session.scope.indexOf(scp); @@ -23,6 +23,7 @@ function create(myOpts) { // maybe use inline instead? , windowType: 'popup' , scope: scope + , debug: opts.debug || myOpts.debug }).then(function (session) { return session; }); @@ -74,6 +75,8 @@ window.navigator.auth = { var myOpts = { directives: directives , conf: conf + , debug: opts.debug + , scope: scope }; return OAUTH3.implicitGrant(directives, { diff --git a/oauth3.core.js b/oauth3.core.js index e7e7388..89b7fc9 100644 --- a/oauth3.core.js +++ b/oauth3.core.js @@ -836,6 +836,9 @@ ); if (opts.debug) { + console.log('[DEBUG] [implicit_grant] url object:'); + console.log(directives.issuer); + console.log(authReq); window.alert("DEBUG MODE: Pausing so you can look at logs and whatnot :) Fire at will!"); }