NodeJS + ExpressJS Authentication and Data Server
Latest additions (20Oct) ->
- Added NO_LOGIN_AFTER_REGISTER boolean
- Added CORS Policy allowance in auth server only
- Login is now a post request (need to update this in home_page)
- Logout too is now a post request (need to update this in home_page)
- Added user reset route in auth and data servers
- Added development env variable reference for auth and data servers.
Utilising
- bcrypt for storing hashed passwords
- JWT for token based server-client communication
- different data and authentication servers at different ports
Features
- Register a user with username, password
- Login with username and password
- Access/Update user data - only if accessToken is verified
- logout
- Multiple users may login at a time, but they can only access their own data from the server
Build
- Clone repo
- npm install
- npm run serverDataAuth
- Make own requests, or check out node_auth_api.postman for a headstart
Limitations
- Not connected to any database, server restart causes data loss. (However I think adding a database connection to this api will not be super hard)
Todos
- Reflect latest changes in postman and home_page.html
- Add expiring tokens. (currently only user logouts will cancel access of a token)
THIS IS ONLY BACKEND - USE POSTMAN or SIMILAR TOOLS FOR TESTING