Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Working example for setting up AWS Cognito for NestJS as backend and NextJS as frontend

Notifications You must be signed in to change notification settings

eventpop/nestjs-nextjs-aws-cognito

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

NestJS + NextJS + AWS Cognito Example

Working example for setting up AWS Cognito for NestJS as backend and NextJS as frontend

Features

  • Authenticate AWS Cognito on NestJS backend, using NextJS as frontend with proxy middleware to prevent CORS & utilize httpOnly cookies.
  • GraphQL login with automatic JWT token refresh
  • REST login (TODO)

Setup

  • Create AWS Cognito User Pool

  • Edit backend .env and add AWS Cognito credentials

  • Edit frontend .env and specify urls

  • Run both frontend & backend on port 3000 & 4000 respectively

    yarn --cwd frontend-nextjs dev
    yarn --cwd backend-nestjs dev

About

Working example for setting up AWS Cognito for NestJS as backend and NextJS as frontend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published