Giter Site home page Giter Site logo

nazhimkalam / jwt-authorization Goto Github PK

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

This repo contains code sample which uses JSON web tokens for API authorization using Node JS, this repo also includes the usage of refresh tokens for higher security

JavaScript 100.00%
jwt authorization nodejs refresh-token security api-requests

jwt-authorization's Introduction

JWT-Authorization ๐Ÿš€

JWT stands for JSON Web Tokens

What is JWT ?

JSON Web Token is a standard used to create access tokens for an application to interact between two parties (client and a server).

Which basically means we make sure that the authorized user is only able to access the resources (apis) he/she is allowed to access.

Why is JWT better than Session cookie based authorization ?

This is because tokens are stored on the client-side while the session uses the server memory to store user data, and this might be an issue when a large number of users are accessing the application at once.

How does JWT work ?

When the user is logged in, each subsequent request will include the JWT, allowing the user to access routes, services, and resources that are permitted with that token.

What is the JSON Web Token Structure ?

In its compact form, JSON Web Tokens consist of 3 parts separated by dots (.), which are:

  • Header
  • Payload
  • Signature

Therefore, a JWT typically looks like the following.

xxxxx.yyyyy.zzzzz

What does this repo contain?

This repo contains code sample which uses JSON web tokens for API authorization using Node JS, this repo also includes the usage of refresh tokens for higher security

jwt-authorization's People

Contributors

nazhimkalam avatar

Stargazers

 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.