Member-only story

Authentication and Authorization with Angular and NestJS

Brad Beighton
JavaScript in Plain English
10 min readOct 27, 2023

A software developer implementing Authentication and Authorization — Generated by AI

Authentication and Authorization are possibly the most important concepts when it comes to application development.

In simple terms, authentication is the process of verifying who a user is, while authorization is the process of verifying what they have access to.

Auth0 has a great real-world comparison for these concepts “When you go through security in an airport, you show your ID to authenticate your identity. Then, when you arrive at the gate, you present your boarding pass to the flight attendant, so they can authorize you to board your flight and allow access to the plane”. No matter whether you’re building something a small side project or a large global SaaS application, you’ll eventually need to consider your Authentication and Authorization strategy. Whilst this concept sounds complex and time-consuming, as it's some of the most widely completed pieces of work there’s a HUGE array of articles, NPM Packages, and third-party identity platforms that can make this easy for you. However, you can 100% do this yourself. Which I’ll show you through this article.

We’ll be using Angular as a front end and NestJS as a backend. However, these concepts can be transferred to pretty much all stacks.

Authentication

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Written by Brad Beighton

I am a Solution Architect for a global workplace management SaaS product. I craft innovative solutions that enhance productivity and user experiences.

No responses yet

What are your thoughts?