• Stars
    star
    159
  • Rank 228,758 (Top 5 %)
  • Language
    JavaScript
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A short and easy boilerplate showcasing JWT auth with Nodejs, the Serverless framework, MongoDB and AWS Lambda.

A crash course on Serverless Authentication/Authorization

A short and easy boilerplate showcasing JWT auth with Nodejs, the Serverless framework, MongoDB and AWS Lambda.

  • The auth folder has a VerifyToken.js file which is the base of the authorizer function.
  • The VerifyToken.auth method is added to the authorizer field in the serverless.yml for API Gateway routes you wish to keep private. See the me function. AuthHandler.me uses event.requestContext.authorizer.principalId to access the userId of the user accessing the resource if the JWT is valid. Otherwise returns 'Unauthorized'.

Note: The concept of middlewares can be applied to this for understanding it easily.

More Repositories

1

securing-restful-apis-with-jwt

How to secure a Nodejs RESTful CRUD API using JSON web tokens?
JavaScript
336
star
2

nodejs-restful-api

How to create a RESTful CRUD API using Nodejs?
JavaScript
327
star
3

serverless-docker-image-resize

Simple serverless image resize on-the-fly - Deploy with one command - Built with AWS Lambda and S3
JavaScript
125
star
4

serverless-side-rendering-react-next

Sample repo for setting up Next and React on AWS Lambda with the Serverless Framework.
JavaScript
121
star
5

serverless-side-rendering-vue-nuxt

Sample project for using Nuxt.js to create a server-side rendered Vue.js app on AWS Lambda and AWS API Gateway.
JavaScript
118
star
6

lambda-mailer

Simple module for receiving an email from a contact form on your website.
JavaScript
83
star
7

building-a-serverless-api-with-nodejs-and-aws-aurora-serverless

JavaScript
62
star
8

building-a-serverless-rest-api-with-nodejs

A quick and easy guide of how to hook up a single Serverless service with basic MongoDB connection and CRUD interaction.
JavaScript
62
star
9

gulp-all-the-things

This tutorial will demo how to set up a bare bones Gulp configuration for automating the time consuming tasks you need to run on a regular basis.
JavaScript
32
star
10

lambda-sns-dlq-error-handling

Sample project for showing the ability to publish an SNS topic and trigger a function from the topic. Code is structured to create a timeout/crash so the dead letter queue SNS topic gets published, in turn triggering the error handler function.
JavaScript
31
star
11

a-crash-course-on-serverless-with-nodejs

A quick and easy guide of how to hook up a single Serverless service.
JavaScript
28
star
12

boilerplate-api

Lightweight Node.js boilerplate API with Docker support, test coverage and circle.ci support.
JavaScript
23
star
13

a-crash-course-on-serverless-apis-with-express-and-mongodb

JavaScript
20
star
14

express-sls-app

How to deploy a Node.js application to AWS Lambda using Serverless, a quick start.
JavaScript
19
star
15

express-docker-app

Hyperminimal setup of an Express app with Docker. :)
Dockerfile
15
star
16

building-a-serverless-rest-api-with-nodejs-and-mongodb-stitch

Sample repository for building a serverless service on AWS Lambda with MongoDB Stitch as a persistent data store
JavaScript
10
star
17

load-balancing-nodejs-in-production

Four samples of how to load-balance Node.js in production.
JavaScript
9
star
18

a-crash-course-on-testing-with-nodejs

JavaScript
9
star
19

meetup-lucky-winner-generator

A simple package with zero dependencies for generating lucky winners if there is a free coupon giveaway at a Meetup event!
JavaScript
6
star
20

hacktoberfest-sarajevo

Official resources for the Sarajevo Hacktoberfest Open Hack Day
5
star
21

nodejs-monitoring-sematext

Starter setup for monitoring Node.js apps with Sematext
JavaScript
5
star
22

express-sls-app-with-stitch

Sample repository for building a serverless service on AWS Lambda with MongoDB Stitch as a persistent data store
JavaScript
5
star
23

javascriptzapocetnike

Exersize Files
HTML
5
star
24

adnanrahic.com

HTML
4
star
25

sls-node11

JavaScript
3
star
26

Serverless-JavaScript-By-Example

JavaScript
3
star
27

a-gentle-intro-to-express

JavaScript
3
star
28

getting-started-with-aws-lambda-and-nodejs

JavaScript
2
star
29

a-crash-course-on-docker

HTML
2
star
30

nodejs-logging-made-easy

JavaScript
1
star
31

weather-app

JavaScript
1
star
32

cdn

1
star
33

a-crash-course-on-integration-testing-with-nodejs

JavaScript
1
star
34

bita4students-nodejs-api

JavaScript
1
star
35

FinalNotesApp

JavaScript
1
star
36

mean-stack-101

MEAN Stack Boilerplate - Intro to the MEAN stack with a notes app
JavaScript
1
star
37

kubernetes-sandbox

Shell
1
star
38

tracetest-docs-update

JavaScript
1
star
39

node-memory-leaks

JavaScript
1
star
40

vanilla-js-app

Creating an app using ES5
JavaScript
1
star
41

error-handling-made-easy

JavaScript
1
star
42

boilerplate-api-ts

This will soon be a lightweight Node.js boilerplate API with TypeScript, Docker support, test coverage and circle.ci support.
TypeScript
1
star