let validated 3rd party tokens pass

This commit is contained in:
AJ ONeal 2017-12-06 07:46:25 +00:00
parent fc07a8dd30
commit aa28f00a4b
1 changed files with 7 additions and 4 deletions

View File

@ -35,11 +35,14 @@ function generateRescope(req, Models, decoded, fullPpid, ppid) {
console.log('[DEBUG] fullPpid:', fullPpid);
console.log('[DEBUG] ppid:', ppid);
throw new Error(
"TODO: No profile found with that credential. Would you like to create a new profile or link to an existing profile?"
);
}
if (!req.oauth3.token.sub || !req.oauth3.token.iss) {
throw new Error(
"TODO: No profile found with that credential. Would you like to create a new profile or link to an existing profile?"
);
}
return req.oauth3.token.sub + '@' + req.oauth3.token.iss;
}
// XXX BUG XXX need to pass own url in to use as issuer for own tokens
req.oauth3.accountIdx = result.sub + '@' + (result.iss || decoded.iss);