better debug handling
This commit is contained in:
parent
bb7fa017ef
commit
a952ee6197
|
@ -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, {
|
||||
|
|
|
@ -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!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue