This is a fully functional basic SANE stack app seed. It has passport Auth0, gulp, and sass capabilities.
- Tested to work with google and facebook
- This system will link all accounts with matching emails
- Clone this repo.
- In the terminal, navigate to the project folder and run 'npm i'.
- Create a 'config.js' file in the server folder (It is already ignored).
var port = 3000; // Feel free to change the port number
module.exports = {
PORT: port,
MASSIVE_URI: 'postgres://localhost/testingdb',
SESSION_SECRET: 'secret',
INITALIZE_LOG: true,
AUTH_CONFIG: {
domain: 'Auth0 domain (Found in Auth0 setup step 5)',
clientID: 'Auth0 clientId (Found in Auth0 setup step 5)',
clientSecret: 'Auth0 clientSecret (Found in Auth0 setup step 5)',
callbackURL: 'http://localhost:' + port + '/auth/callback'
}
};
- Go to auth0.com and log in / sign up.
- On the Dashboard, click the new client button in the top right corner.
- Give your app a name and select the 'Single Page Web App' client type.
- On your client page, click the settings tab.
- Here you will find all the info you will need to finish your 'config.js'.
- Scroll down and add 'http://localhost:PORT/auth/callback' (Where 'PORT' is the port number from your config) to your 'Allowed Callback URLs' input box (make sure to save when your done)
- If you want to use facebook, go to social connections and on the attributes section of the facebook connection, enable email. (or if you want to do this for any other connection as well, an email is required. if there is no email, it wont work). Otherwise, disable facebook.
- Run
npm install -g gulp
(if you have not installed it previously). - In a terminal window, navigate to the project folder and run
gulp
.
- In a new terminal window, navigate to the project folder and run
nodemon
.