Skip to content

Instantly share code, notes, and snippets.

@mrmccormack
Created November 23, 2017 14:20
Show Gist options
  • Save mrmccormack/40810d7f06fb207b0c50485344dea5ac to your computer and use it in GitHub Desktop.
Save mrmccormack/40810d7f06fb207b0c50485344dea5ac to your computer and use it in GitHub Desktop.
Hackathon Modifications UpWork Contractor

Here is a slightly modified hackathon (original at: https://github.com/sahat/hackathon-starter)

Test user setup :

u: mrmccormack@gmail.com
p: lovisa

You can see my changes on Github.

  1. I added the username to sign up form, and as a disabled field in /account
  2. other minor things.

NOTES:

  1. In the real app, there is NO login, it is done with passwordless login, but for testing this out... I left the password in the signup form, and in the /login form
  2. An mLabs Mongodb is setup for this repository for testing only
  3. I have NOT entered the code to validate the email and username as shown at my Stackoverflow post: https://stackoverflow.com/questions/47272875/expressjs-error-headers-serverresponse-outgoingmessage-setheader/47312764#47312764
  4. I have added the code for the revised logout sahat/hackathon-starter#758 see file: app.js (logout added there)

Problems noticed.

  1. the login form, does not always log in the user... sometimes it returns to http://localhost:8080/login without and error, even though correct username and password were entered. Not sure why this is. It happens quite a bit.

** I wonder, since this only happens when I do a bunch of sign-ups in a short period of time if Passport has some kind of protection, like flood protection to prevent one IP from overloading the website? ** What do you think.

Q: Can you see the problem?


Scope of work from Upwork contract:

REQUIRED: It will be necessary to comment all change to code, so I can understand them.

Task 1: Add username to signup:

User will sign up with username, and email. (template has only email signup)

Task 2: Review and comment my change to hackathon-starter

Task 3: Fix Deprecation Warning

  • Fix error when running hackathon.
  • (node:80605) DeprecationWarning: req.validationErrors() may be removed in a future version. Use req.getValidationResult() instead.

General Notes (for info only, not part of the scope of the work):

  • I'll be looking for ongoing support for my app (based on hackathon template). I'm experienced in working at a distance. My app is hosted on Digital Ocean, Ngnix.

  • My actual app will be passwordless, so I don't need any of hackathon's Passport integrations strategies, I only use local strategy, and have changed the "Forgot Password" feature into a passwordless (magic link) way of signing in. It seems to be working so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment