summaryrefslogtreecommitdiff
path: root/server/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-07-02 16:22:51 -0400
committerJules Laplace <jules@okfoc.us>2014-07-02 16:22:51 -0400
commit221a14315b09946db2485036bbf4a80295dc4889 (patch)
treea0c96d11dac2aed77cc453e2fcb9841fcae4d19e /server/index.js
parentbde9f3e47d66a1c8a334763146671320ac0359f9 (diff)
password reset / username dupe stuff from PH
Diffstat (limited to 'server/index.js')
-rw-r--r--server/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/index.js b/server/index.js
index b008131..bb242ee 100644
--- a/server/index.js
+++ b/server/index.js
@@ -61,6 +61,7 @@ site.setup = function(){
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);
+ app.enable('trust proxy')
app.get('env') === 'development' && app.use(express.errorHandler());
// Essential middleware
@@ -90,6 +91,13 @@ site.route = function () {
app.get('/auth/twitter/callback', auth.loggedIn('twitter'));
app.get('/auth/facebook', auth.login('facebook'));
app.get('/auth/facebook/callback', auth.loggedIn('facebook'));
+ app.get('/auth/usernameTaken', auth.views.usernameTaken);
+ app.post('/auth/usernameTaken', auth.usernameFixed);
+ app.get('/auth/password', auth.views.resetPassword);
+ app.post('/auth/password', auth.resetPassword);
+ app.post('/auth/passwordForgot', auth.forgotPassword);
+
+
app.get('/profile', views.profile)
app.get('/profile/edit', views.profile)
app.get('/profile/:name', views.profile)