Giter Club home page Giter Club logo

cointab-login-challenge's Introduction

Cointab-Login-Challenge

This is the challenge where one has to block the user for 24 hours if he fails to login for 5 consecutive attempts

Tech stack used

  • Node JS
  • MongoDB

Node modules used

  • Mongoose (for mongodb)
  • body-parser (to read data from body)
  • cookie-parser (to read cookies) as I'm using cookie based auth
  • Nodemon
  • ejs
  • express

cointab-login-challenge's People

Contributors

karanfulare avatar bot5294 avatar

Watchers

 avatar

Forkers

bot5294

cointab-login-challenge's Issues

Login Problem

I did this assignment for a interview in a company , it was all working well upto yesterday and today when I presented the file to them in Interview it failed , i even tested the file several times before submitting , Don't know why Javascript or my Fate behaves so , please help me with the user login , the problem statement is " that user should not be able to login for 24 hours for after 5 failed attempts " ,
I achieved this by adding a date variable(named as "time" ) in user schema and a variable named as "login" , where the login variable increase after each failed attempt and when user.login == 4 , the date variable( named as"time" in user schema) is increased by 24 hours , AND the only condition when the user can login is when ( user.login < 5 && user.time < currentdate ), still the user is able to login after 5 failed attempts .
files to look -- login.js and User.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.