Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function reqTokenDone(err, xhr) {
o.done();
if (err) return callback(err);
var resp = ohauth.stringQs(xhr.response);
token('oauth_request_token_secret', resp.oauth_token_secret);
var authorize_url = o.url + '/oauth/authorize?' + ohauth.qsString({
oauth_token: resp.oauth_token,
oauth_callback: resolveUrl(o.landing)
});
if (o.singlepage) {
location.href = authorize_url;
} else {
popup.location = authorize_url;
}
}
function reqTokenDone(err, xhr) {
o.done();
if (err) return callback(err);
var resp = ohauth.stringQs(xhr.response);
token('oauth_request_token_secret', resp.oauth_token_secret);
var authorize_url = o.url + '/oauth/authorize?' + ohauth.qsString({
oauth_token: resp.oauth_token,
oauth_callback: o.landing || location.href.replace('index.html', '')
.replace(/#.*/, '').replace(location.search, '') + 'land.html'
});
if (o.singlepage) {
location.href = authorize_url;
} else {
popup.location = authorize_url;
}
}
function reqTokenDone(err, xhr) {
o.done();
if (err) return callback(err);
var resp = ohauth.stringQs(xhr.response);
token('oauth_request_token_secret', resp.oauth_token_secret);
var authorize_url = o.urls.authorize + '?' + ohauth.qsString({
oauth_token: resp.oauth_token,
oauth_callback: location.href.replace('index.html', '')
.replace(/#.*/, '') + o.landing
});
if (o.singlepage) {
location.href = authorize_url;
} else {
popup.location = authorize_url;
}
}
function reqTokenDone(err, xhr) {
o.done();
if (err) {
if (timer) clearInterval(timer);
return callback(err);
}
var resp = ohauth.stringQs(xhr.response);
token('oauth_request_token_secret', resp.oauth_token_secret);
var authorize_url = o.url + '/oauth/authorize?' + ohauth.qsString({
oauth_token: resp.oauth_token,
oauth_callback: location.href.replace('index.html', '')
.replace(/#.*/, '') + o.landing
});
if (o.singlepage) {
location.href = authorize_url;
} else {
popup.location = authorize_url;
}
}
function reqTokenDone(err, xhr) {
o.done();
if (err) return callback(err);
var resp = ohauth.stringQs(xhr.response);
token('oauth_request_token_secret', resp.oauth_token_secret);
var authorize_url = o.url + '/oauth/authorize?' + ohauth.qsString({
oauth_token: resp.oauth_token,
oauth_callback: location.href.replace('index.html', '')
.replace(/#.*/, '').replace(location.search, '') + o.landing
});
if (o.singlepage) {
location.href = authorize_url;
} else {
popup.location = authorize_url;
}
}