Adds Steam auth and API
This commit is contained in:
6
app.js
6
app.js
@@ -118,6 +118,8 @@ app.get('/api/aviary', apiController.getAviary);
|
||||
app.get('/api/paypal', apiController.getPayPal);
|
||||
app.get('/api/paypal/success', apiController.getPayPalSuccess);
|
||||
app.get('/api/paypal/cancel', apiController.getPayPalCancel);
|
||||
app.get('/api/steam', passportConf.isAuthorized, passportConf.isAuthorized, apiController.getSteam);
|
||||
|
||||
|
||||
/**
|
||||
* OAuth routes for sign-in.
|
||||
@@ -144,6 +146,10 @@ 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/steam', passport.authenticate('steam'));
|
||||
app.get('/auth/steam/callback', passport.authenticate('steam', { failureRedirect: '/login' }), function(req, res) {
|
||||
res.redirect('/api/steam');
|
||||
});
|
||||
|
||||
app.listen(app.get('port'), function() {
|
||||
console.log("✔ Express server listening on port %d in %s mode", app.get('port'), app.settings.env);
|
||||
|
Reference in New Issue
Block a user