A React HOC for AWS Cognito to Simplify User Authentication

Written by asellitti | Published 2019/08/31
Tech Story Tags: cognito | aws | react | reactjs | authentication | jwt | cognito-hoc | latest-tech-stories

TLDR A React HOC for AWS Cognito to Simplify User Authentication is a very common one across apps and platforms. Amazon Web Services offers Cognito as a solution for Web and Mobile apps, and it has pretty robust features to handle your Authentication needs. Here we describe a Higher Order Component for your ReactJS Web App, and how to configure Cognito. You can use any backend that is secured through JWT Tokens (e.g., API Gateway, etc.) When a user logs in, tokens will be provided to the client using our configured storage mechanism (in-memory, localStorage, or IndexedDB) After that, cognito-hoc handles all authentication flows using Cognito and AWS Amplify.via the TL;DR App

no story

Written by asellitti | Partner & Principal Consultant at System Design Partners
Published by HackerNoon on 2019/08/31