Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function connect (conf) {
if (conf["bitbucket.secret"] && conf["bitbucket.key"]) {
var oauth = {
"consumer_key": conf["bitbucket.key"],
"consumer_secret": conf["bitbucket.secret"]
};
return checkOAuth(oauth).then(null, createOAuth);
} else {
// No token found: create new one
return createOAuth();
}
}