
Explore Angular and Deno authentication workflows, including login, registration, forgot and reset password via email, and JWT-based sessions, with a TypeScript focus.
Install Deno and explore the main page and library modules. Build a simple hello world server by importing serve from the Deno standard library and running on localhost with permissions.
Explore routing in a Deno app by importing router libraries, defining get endpoints for the homepage and a new page, returning responses, and running the server on port 8000.
Install denon and configure a configuration file with a start command and file match patterns to watch specified files and auto-restart the server on edits, listening on port 8000.
Create an OAuth controller with a register function, parse request inputs from the context, and send a JSON post to /api/register, preparing to store data in a database.
Learn how to create and apply migrations with Coton, configure a local MySQL connection, and create a users table with first name, last name, email, and password.
Register a new user by connecting to the database, inserting first name, last name, email, and a password encrypted with bcrypt, and returning success.
Implement the repository pattern for user data in TypeScript by defining an abstract repository and a concrete user repository that handles database connections and the users table.
Implement a login function that authenticates by email and password, using a repository to find the user and validate the hashed password, returning errors as needed. Prepare for JWT generation.
Generate a jwt using a package, with a secret key and payload including the user id as issuer and a one-hour expiry, then store the token in an httpOnly cookie.
Learn how to refactor authentication code by creating an auth helpers module, implementing a generate jwt function that uses the user id, and handling asynchronous return to streamline token creation.
Implement an OAuth middleware to verify a logged-in user using cookies and a JWT, returning unauthenticated on invalid tokens and proceeding to the next controller when valid.
Fetches the current authenticated user by validating the JWT from cookies, retrieves the user by id, and returns first name, last name, and email without the password.
Store secrets in environment variables instead of code, access them in deno via the environment, handle undefined values, and enable the allow-env flag for secure runtime.
Develop the forgot password flow by creating a forgot controller and api/forgot endpoint, generating a 12-character token, storing it in password_reset, and sending a reset email.
Configure a mailer to send password reset emails via MailHog, connect to localhost:1025, and embed a reset link built from the frontend URL and a token.
Implement a reset password flow in Angular and Deno authentication, validating password and confirmation, verifying token and email via repositories, updating the user's password, and returning a success message.
Implement a logout function that deletes the JWT cookies and returns a success message, ready for front-end testing.
Import the course model and configure cors to allow cookies by enabling credentials and using an origin regular expression that accepts the frontend host.
Create an Angular front-end project with ng new, add routing and CSS, then run the dev server and view the app at localhost:4200.
Generate login, register, and home components, configure router links, and add an outer outlet to enable seamless navigation in an Angular app.
Create a register page with a reactive form, including first name, last name, email, password, and password confirm; post data to /register and navigate to login on success.
Learn the login flow in Angular and Deno authentication by handling email and password, using an interceptor to attach cookies with credentials, and redirecting after login.
Fetch the authenticated user via http client, greet with the first and last name on success, show not logged in on failure, and offer a logout button.
Share authentication state between home and nav via an authentication event emitter, updating login or logout user interface and performing a server logout post.
Create the forgot password page in Angular and Deno authentication, implement an email-only form posting to forgot, show success or error alerts, and deliver a reset link to the user.
Implement a reset password flow in Angular and Deno authentication by building a reset component, capturing password and confirmation, posting token-based data, and navigating to login on success.
Learn how to authenticate using Angular and Deno.
In Deno you will learn:
Use Typescript
Create public and secure routes
Connect with MySQL
Run Migrations
Register Users
Generate Jwt Tokens
Use HttpOnly Cookies
Send Emails
In Angular you will learn:
Use Angular CLI
Create components and routes
Consume API calls
Use Event Emitters
I'm a FullStack Developer with 10+ years of experience. I'm obsessed with clean code and I try my best that my courses have the cleanest code possible.
My teaching style is very straightforward, I will not waste too much time explaining all the ways you can create something or other unnecessary information to increase the length of my lectures. If you want to learn things rapidly then this course is for you.
I also update my courses regularly over time because I don't want them to get outdated. So you can expect more content over time from just one course with better video and audio quality.
If you have any coding problems I will offer my support within 12 hours when you post the question. I'm very active when trying to help my students.
So what are you waiting for, give this course a try and you won't get disappointed.