From 67da9d7f01ac733bebdae8ff47ed0171348d1ec5 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Mon, 9 Dec 2013 17:14:20 -0500 Subject: [PATCH] Last.fm auth callbacks --- app.js | 4 ++++ controllers/api.js | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 61b84a5020..bd7e056547 100755 --- a/app.js +++ b/app.js @@ -94,6 +94,10 @@ app.get('/auth/foursquare/callback', passport.authorize('foursquare', { failureR app.get('/auth/tumblr', passport.authorize('tumblr')); app.get('/auth/tumblr/callback', passport.authorize('tumblr', { failureRedirect: '/api' }), function(req, res) { res.redirect('/api/tumblr'); }); +app.get('/auth/lastfm', passport.authorize('lastfm')); +app.get('/auth/lastfm/callback', passport.authorize('lastfm', { failureRedirect: '/api' }), function(req, res) { res.redirect('/api/lastfm'); }); + + app.listen(app.get('port'), function() { console.log('Express server listening on port ' + app.get('port')); }); diff --git a/controllers/api.js b/controllers/api.js index cbe7193441..5772dd6ec3 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -182,9 +182,8 @@ exports.getNewYorkTimes = function(req, res) { */ exports.getLastfm = function(req, res) { var lastfm = new LastFmNode({ - api_key: 'apikey', // sign-up for a key at http://www.last.fm/api - secret: 'secret', - useragent: 'appname/vX.X MyApp' // optional. defaults to lastfm-node. + api_key: '1f3e35019e98124cc8f75f8ae99df25f', // sign-up for a key at http://www.last.fm/api + secret: '4ae76d10d76cf680cebf4f0c8dea1aa4' }); };