Closed generictitle closed 7 years ago
Usage:
Client.Web.Challenge.resolve(error)
.then(function(challenge) {
// challenge instanceof Client.Web.Challenge
if(challenge.type == 'email') {
return challenge.email();
} else if(challenge.type == 'button') {
return challenge.click();
}
}).then(function(challenge) {
if(challenge.type == 'email') {
return challenge.code(dataObj.code);
} else if(challenge.type == 'button') {
return challenge;
}
})
.then(function(challenge) {
// Yey Instagram accepted the code
// now we confirmed that Instagram is happy, weird :P
return challenge.confirmate()
})
Any updates on this?
Checkpoint resolve system was overwritten some time ago. Tell me if there are problems left with it.
Hey I've been using the checkpoint functions and have a view thoughts
First, the requirement that a 'number' type is supplied for email code checkpoints causes leading zeros to be lost, and it seems that Instagram will therefore reject 1 in 10 checkpoints that start with a 0. I suggest using a string type so that zeros aren't lost, or does this cause other problems?
Second, there's a type of checkpoint that isn't covered - the "Was this you?" button click checkpoint. I've written the code for it but don't have time to create a pull request and strip out my other code. Here it is if you'd like to include it :) I'll try and get a pull request created in the next week or two if this isn't much help.
and in the Challenge.resolve bit add this: