Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a semicolon in the end of line. #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions examples/login/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var express = require('express')
, util = require('util')
, InstagramStrategy = require('passport-instagram').Strategy;

var INSTAGRAM_CLIENT_ID = "--insert-instagram-client-id-here--"
var INSTAGRAM_CLIENT_ID = "--insert-instagram-client-id-here--";
var INSTAGRAM_CLIENT_SECRET = "--insert-instagram-client-secret-here--";


Expand Down Expand Up @@ -68,15 +68,15 @@ app.configure(function() {
});


app.get('/', function(req, res){
app.get('/', function(req, res) {
res.render('index', { user: req.user });
});

app.get('/account', ensureAuthenticated, function(req, res){
app.get('/account', ensureAuthenticated, function(req, res) {
res.render('account', { user: req.user });
});

app.get('/login', function(req, res){
app.get('/login', function(req, res) {
res.render('login', { user: req.user });
});

Expand All @@ -87,7 +87,7 @@ app.get('/login', function(req, res){
// will redirect the user back to this application at /auth/instagram/callback
app.get('/auth/instagram',
passport.authenticate('instagram'),
function(req, res){
function(req, res) {
// The request will be redirected to Instagram for authentication, so this
// function will not be called.
});
Expand All @@ -103,7 +103,7 @@ app.get('/auth/instagram/callback',
res.redirect('/');
});

app.get('/logout', function(req, res){
app.get('/logout', function(req, res) {
req.logout();
res.redirect('/');
});
Expand All @@ -118,5 +118,5 @@ app.listen(3000);
// login page.
function ensureAuthenticated(req, res, next) {
if (req.isAuthenticated()) { return next(); }
res.redirect('/login')
res.redirect('/login');
}