Coder Social home page Coder Social logo

meet-forever / cookie-validation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 335 KB

Simple demonstration to showcase how cookie validation works on a website.

Dockerfile 0.91% CSS 4.14% JavaScript 26.91% EJS 68.04%
cookie-validation ejs-express docker

cookie-validation's Introduction

Cookie Validation

Site Flow

Main Page

When a user opens the website, they will see the page on the left side. Notice, currently the browser dosen't have any cookie on it.

Sign Up Page

The user will go to sign up page, and they will register their account. This will store the data into the database.

Sign In Page

After that, the user will be redirected to the sign in page, and they will fill up their credentials. This will parse the database to check if the user exists, and if they exists, then add cookie and redirect the user to the home page.

User's Home Page

Now the users can access their secret pages. Also, they can close their home page tab and reopen it again without worrying about signing in again. However, this will only lasts till the cookie expires.

Note: This will clear the cookie after one minute and user's data after two minutes.


Docker Image

To try it on your own computer, pull the following docker image by typing the following command on your terminal:

docker pull meetnpatel/cookievalidator

Few instructions for running the above docker image:

  • Port number must be the same for both host and container to run the website successfully.
  • Also, to run the website on a custom port an environment variable PORT will be required.

Default:

docker run -it -p 8000:8000 meetnpatel/cookievalidator

Custom Port:

docker run -it -p 7777:7777 -e PORT='7777' meetnpatel/cookievalidator

Website also contains detailed explaination for each function use to understand cookie validation.

cookie-validation's People

Contributors

meet-forever avatar

Watchers

 avatar

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.