Skip to content

Commit

Permalink
adds a helpful comment and two missing semicolons
Browse files Browse the repository at this point in the history
The new comment links to the google api console. It took me longer to
find that than it did to get these examples up and running.

The semicolons weren't critical, but it's too easy to miss their lack
if someone is copy/pasting chunks of this code into their own project.
  • Loading branch information
robertpateii committed Mar 14, 2012
1 parent b31e0b7 commit 6c517c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions examples/oauth/app.js
Expand Up @@ -3,7 +3,9 @@ var express = require('express')
, util = require('util')
, GoogleStrategy = require('passport-google-oauth').OAuthStrategy;

var GOOGLE_CONSUMER_KEY = "--insert-google-consumer-key-here--"
// API Access link for creating client ID and secret:
// https://code.google.com/apis/console/b/0/
var GOOGLE_CONSUMER_KEY = "--insert-google-consumer-key-here--";
var GOOGLE_CONSUMER_SECRET = "--insert-google-consumer-secret-here--";


Expand Down Expand Up @@ -118,5 +120,5 @@ app.listen(3000);
// login page.
function ensureAuthenticated(req, res, next) {
if (req.isAuthenticated()) { return next(); }
res.redirect('/login')
res.redirect('/login');
}
6 changes: 4 additions & 2 deletions examples/oauth2/app.js
Expand Up @@ -3,7 +3,9 @@ var express = require('express')
, util = require('util')
, GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;

var GOOGLE_CLIENT_ID = "--insert-google-client-id-here--"
// API Access link for creating client ID and secret:
// https://code.google.com/apis/console/b/0/
var GOOGLE_CLIENT_ID = "--insert-google-client-id-here--";
var GOOGLE_CLIENT_SECRET = "--insert-google-client-secret-here--";


Expand Down Expand Up @@ -119,5 +121,5 @@ app.listen(3000);
// login page.
function ensureAuthenticated(req, res, next) {
if (req.isAuthenticated()) { return next(); }
res.redirect('/login')
res.redirect('/login');
}

0 comments on commit 6c517c5

Please sign in to comment.