Member-only story
How to Build a User Authentication Flow with Next.js, FastAPI, and PostgreSQL
6 min readDec 24, 2021
This is a continuation of previous articles on how to build, deploy, and dockerize a Next.js, FastAPI, and PostgreSQL boilerplate.
Table of Contents
- Full Stack Next.js, FastAPI, PostgreSQL Tutorial
- How to Build a Full Stack Next.js, FastAPI, PostgreSQL Boilerplate Tutorial
- How to Deploy Next.js, FastAPI, and PostgreSQL with Shell Scripts
- How to Develop a Full Stack Next.js, FastAPI, PostgreSQL App Using Docker
- How to Build a User Authentication Flow with Next.js, FastAPI, and PostgreSQL
- How to Test an API with Pytest and Requests
The tutorial branch:
https://github.com/travisluong/nfp-boilerplate/tree/tutorial-4-user-authentication
The completed project:
https://github.com/travisluong/nfp-boilerplate
This tutorial builds off of the previous tutorials. For a more detailed explanation on building out user authentication flow, see the official FastAPI documentation on security.
The steps contained in this tutorial are a “shortcut” version of the official tutorial, skipping much of the explanatory steps in the documentation.
Install dependencies
$ pip install python-multipart "python-jose[cryptography]"…