Skip to content
Snippets Groups Projects
Commit 6e274e87 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

repair internal.get API - it should return a bare assertion represented as a...

repair internal.get API - it should return a bare assertion represented as a string, not an object - issue #1395
parent 4e1d091d
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,12 @@
*/
internal.get = function(origin, callback, options) {
function complete(assertion) {
// The API is supposed to return a string assertion, not an
// object. issue #1395
if (typeof assertion === 'object' && assertion.assertion) {
assertion = assertion.assertion;
}
// If no assertion, give no reason why there was a failure.
callback && callback(assertion || null);
}
......@@ -90,7 +96,13 @@
*/
function getSilent(origin, email, callback) {
function complete(assertion) {
callback && callback(assertion);
// The API is supposed to return a string assertion, not an
// object. issue #1395
if (typeof assertion === 'object' && assertion.assertion) {
assertion = assertion.assertion;
}
callback && callback(assertion || null);
}
user.checkAuthenticationAndSync(function(authenticated) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment