Commit 73b723fd authored by Alexei's avatar Alexei

Implement a method to verify credentials

parent b034f021
......@@ -18,6 +18,7 @@ var access_token = {
};
var allowed = false;
var credentials_verified = false;
var GSInstance = {
fancyLink: 0,
......@@ -56,11 +57,16 @@ ipcRenderer.on('needs-auth', function(event, data) {
ipcRenderer.on('token', function(event, data) {
access_token = data;
console.log(access_token);
oauth.get('https://quitter.no/api/account/verify_credentials.json', access_token.public, access_token.secret, verify_credentials);
});
var authorizeWindow = null;
function verify_credentials(a, b, c) {
if (c.statusCode == 200 && c.statusMessage == 'OK')
credentials_verified = true;
}
function handleRequestToken(err, token, token_secret, parsedQueryString) {
if (err === null) {
if (parsedQueryString.oauth_callback_confirmed === 'true') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment