Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Extracted the configuration keys out of the example app so I could

have local copies of them 'woot'.
  • Loading branch information...
commit d739110fb319e3fb73c99859f8e971492f71b9bc 1 parent 20aebe6
@ciaranj authored
View
1  examples/.gitignore
@@ -0,0 +1 @@
+keys_file.js
View
30 examples/app.js
@@ -10,24 +10,18 @@ var getPasswordForUserFunction= function(user, callback) {
callback(null, result);
}
-// N.B. TO USE Any of these strategies the following relevant parameters must be defined!!!.
-var fbId= "";
-var fbSecret= "";
-var fbCallbackAddress= "http://yourtesthost.com/auth/facebook_callback"
-var ghId= "";
-var ghSecret= "";
-var ghCallbackAddress= "http://yourtesthost.com/auth/github_callback";
-var twitterConsumerKey= "";
-var twitterConsumerSecret= "";
-var yahooConsumerKey= "";
-var yahooConsumerSecret= "";
-var yahooCallbackAddress= "http://yourtesthost.com/auth/yahoo_callback";
-var foursquareConsumerKey= "";
-var foursquareConsumerSecret= "";
-var janrainApiKey= "";
-var janrainAppDomain= "yourrpxnowsubdomain";
-var janrainCallbackUrl= "http://localhost/auth/janrain_callback";
-
+// N.B. TO USE Any of the OAuth or RPX strategies you will need to provide
+// a copy of the example_keys_file (named keys_file)
+try {
+ var example_keys= require('./keys_file');
+ for(var key in example_keys) {
+ global[key]= example_keys[key];
+ }
+}
+catch(e) {
+ console.log('Unable to locate the keys_file.js file. Please copy and ammend the example_keys_file.js as appropriate');
+ return;
+}
function routes(app) {
app.get ('/auth/twitter', function(req, res, params) {
View
16 examples/example_keys_file.js
@@ -0,0 +1,16 @@
+exports.fbId= "";
+exports.fbSecret= "";
+exports.fbCallbackAddress= "http://yourtesthost.com/auth/facebook_callback"
+exports.ghId= "";
+exports.ghSecret= "";
+exports.ghCallbackAddress= "http://yourtesthost.com/auth/github_callback";
+exports.twitterConsumerKey= "";
+exports.twitterConsumerSecret= "";
+exports.yahooConsumerKey= "";
+exports.yahooConsumerSecret= "";
+exports.yahooCallbackAddress= "http://yourtesthost.com/auth/yahoo_callback";
+exports.foursquareConsumerKey= "";
+exports.foursquareConsumerSecret= "";
+exports.janrainApiKey= "";
+exports.janrainAppDomain= "yourrpxnowsubdomain";
+exports.janrainCallbackUrl= "http://localhost/auth/janrain_callback";
Please sign in to comment.
Something went wrong with that request. Please try again.