google and yahoo oauth

14 views
Skip to first unread message

arief nur andono

unread,
Jan 15, 2014, 7:52:42 PM1/15/14
to tot...@googlegroups.com
it's a dirty code to redirect to google and yahoo oauth2..

this is google function in controller

function process_google() {
    var self = this;
    var google = self.module('google');
    if(!self.get['openid.mode']){
        var code = '';
    }else{
        if(self.get['openid.mode']=='cancel'){
            self.redirect('/');
        }else{
            var code = self.get['openid.mode'];        
        }
    }

    if (code === '') {
        var url = google.redirect(self.host('/login/google/'));
        self.redirect(url);
        return;
    }
    else{
        self.json(self.get['openid.mode']);    
    }
}

anybody made twitter login?
google.js
yahoo.js

Peter Širka

unread,
Jan 17, 2014, 4:32:17 PM1/17/14
to tot...@googlegroups.com
Hi Arief,
thanks - I'll test it.
Reply all
Reply to author
Forward
0 new messages