sails-hook-user
Creates all the user's functionality for login and registration
Make sure you have a css stylesheet called login.css and that will be the only style for that page
Routes created
GET /registerPOST /register GET /loginPOST /login GET /logoutPOST /logout GET /request_password_resetPOST /request_password_reset GET /resetPasswordPOST /resetPassword
How to Install
-
- Install the module
npm i https://github.com/bxfsh/sails-hook-user.git --save
this will install all the EJS files and all the routes
-
- Then you need to override your /config/views.js
/** * View Engine Configuration * (sails.config.views) * * This checks for the correct layout file and minimizes the HTML before sending to the front end * * http://sailsjs.org/#/documentation/concepts/Views */ var minify = minify;var ejs = ; var { var str; optionslocals = optionslocals || {}; // finding the correct layout file // the path is relative ;}; moduleexportsviews = engine: ext: 'ejs' fn: parsing // set the default layout to false layout: false ;
-
- Style
By default this hook does not generate any css, but to style it you only need to create a css file called login.css in the root stylesheet folder
you can find a sample here https://github.com/bxfsh/sails-hook-user/blob/master/sample/login.css