Permalink
Browse files

register

  • Loading branch information...
rjrodger committed Mar 21, 2013
1 parent f3c3e3e commit 25d378cec3e2e8cc2d09d49353316c6f31f38f11
Showing with 60 additions and 1 deletion.
  1. +8 −1 user-accounts/app.js
  2. +16 −0 user-accounts/config.template.js
  3. +36 −0 user-accounts/public/index.html
View
@@ -10,6 +10,10 @@ var argv = require('optimist').argv
// create a seneca instance
var seneca = require('seneca')()
+
+// load configuration for plugins
+// top level properties match plugin names
+// copy template config.template.js to config.mine.js and customize
seneca.use('config',{file:'./config.mine.js'})
@@ -24,7 +28,10 @@ seneca.use('user')
// the auth plugin handles HTTP authentication
seneca.use('auth',{
// redirects after login are needed for traditional multi-page web apps
- redirect:{login:{win:'/account',fail:'/login#failed'}}
+ redirect:{
+ login:{win:'/account',fail:'/login#failed'},
+ register:{win:'/account',fail:'/#failed'},
+ }
})
@@ -0,0 +1,16 @@
+{
+ "auth": {
+ "service": {
+ "twitter": {
+ "key": "TWITTER_KEY",
+ "secret": "TWITTER_SECRET",
+ "urlhost": "http://localhost:3000"
+ },
+ "facebook": {
+ "key": "FACEBOOK_ID",
+ "secret": "FACEBOOK_SECRET",
+ "urlhost": "http://localhost:3000"
+ }
+ }
+ }
+}
@@ -9,6 +9,42 @@
<br />
<a href="/auth/twitter">Twitter Login</a><br />
+<a href="/auth/facebook">Facebook Login</a><br />
+
+<br />
+
+<div id="content_register" class="content">
+
+<h1>Register</h1>
+<form id="login" action="/auth/register" method="post">
+
+<p>
+<label for="name">Name:</label><br />
+<input id="name" name="name" />
+</p>
+
+<p>
+<label for="email">Email:</label><br />
+<input id="email" name="email" />
+</p>
+
+<p>
+<label for="password">Password:</label><br />
+<input type="password" id="password" name="password" />
+</p>
+
+<p>
+<label for="repeat">Repeat Password:</label><br />
+<input type="password" id="repeat" name="repeat" />
+</p>
+
+<p>
+<input type="submit">
+</p>
+</form>
+
+</div>
+
</body>
</html>

0 comments on commit 25d378c

Please sign in to comment.