Merge branch 'master' of git.daplie.com:Daplie/oauth3.js

This commit is contained in:
AJ ONeal 2017-01-18 22:56:38 +00:00
commit cecda1c36b
1 changed files with 10 additions and 0 deletions

View File

@ -16,9 +16,15 @@
var qs = [];
Object.keys(params).forEach(function (key) {
// TODO nullify instead?
if ('undefined' === typeof params[key]) {
return;
}
if ('scope' === key) {
params[key] = core.stringifyscope(params[key]);
}
qs.push(encodeURIComponent(key) + '=' + encodeURIComponent(params[key]));
});
@ -182,6 +188,10 @@
var clientId = opts.appId || opts.clientId;
var args = directive.otp;
if (!directive.otp) {
console.log('[debug] loginCode directive:');
console.log(directive);
}
var params = {
"username": opts.id || opts.username
, "request_otp": true // opts.requestOtp || undefined