
Learn to implement authentication with Angular and Go using the Fiber framework, including login, register, forgot password with email delivery via MailHog, and password reset flows.
Install Go from the official site, open an empty folder, create a main package, write a main function, import fmt, print hello, and run the program with go run.
Install and run the fiber framework for go, inspired by express, by configuring GOPATH, downloading fiber v1, and starting a hello world server on localhost.
Explain Go pointers and the star operator, showing typed variable declarations with :=, addresses versus values, and using pointers to update memory. Show functions returning strings or errors.
Connect to a database using Go, GORM, and the MySQL driver, set up the connection with proper configuration, and handle errors with panic to verify a successful database connection.
Learn to return multiple values in Go with a divide function that yields result and an error. Define a user struct with a name field and initialize it.
Organize a Go project into packages by creating database, routes, and controllers folders, exporting functions with uppercase names, and wiring a GORM-based database connection with fiber.
define a user struct with id, first name, last name, email, and password, place it in models, register via a post endpoint, and test with a tool.
Implement migrations with gorm to create and update the user table, enforcing a unique email, auto migration, and basic fields like id, first name, last name, and password.
Extract and validate registration data from the request body using a body parser, map first name, last name, email, and password, and enforce password confirm with fiber map.
learn to add a password hashing package, hash a password with a cost factor, and save the new user to the database using a gorm connection.
Implement the login function by handling a post request, retrieving a user by email, and verifying the password against a hash, with not found and incorrect password error handling.
Generate a JWT by creating standard claims with the user id, set a one-day expiration, sign with HS256 using a secret, and send it from frontend to backend.
Explore how to create and configure HttpOnly cookies for JWT tokens, set expiration, enable CORS with credentials, and securely transmit cookies between the backend and frontend.
Retrieve the authenticated user by reading the cookie, decoding and validating the JWT with claims, then use the token issuer to fetch the user data from the API.
Implement a logout function that sends a post request to logout and deletes the authentication cookie by setting its expiry in the past, triggering unauthenticated state until login.
Implement secure user responses by omitting the password and formatting fields like id, first_name, last_name, and email in snake_case using Gorm, demonstrated during login and registration.
Implement a forgot password flow by adding a password reset model and table, generating a 12-character token, storing it, and returning a success response.
Install and run mailhog to catch emails, then use net/smtp to send a reset password message. Include a localhost reset link with framework ports (react 3000, angular 4200, vue 88).
Explains implementing a password reset flow: validate token and password confirmation, encrypt the new password, update the user record, and test success and error scenarios.
Install and run an Angular front end by creating a new project, enabling routing, applying css, and launching the local server at localhost:4200.
Learn angular navigation by scaffolding login, register, and home pages, configuring router links, and using an outer outlet to display pages within a single app.
Build a register page with Angular reactive forms, capturing first name, last name, email, password, and confirm, posting to /register and redirecting to login on success.
Implement a login flow with email and password, use an interceptor to send credentials and capture cookies, then redirect to the main page after login.
Fetch the authenticated user in the home component via /api/user, handle success and error, display the user's first and last name, or show you are not logged in and logout.
Demonstrates implementing a logout flow by emitting authentication state via an event emitter, updating nav components, and triggering server logout with a redirect to login.
Create a forgot password page and component that accepts an email, posts to forgot, and displays 'email was sent' or 'email does not exist' messages.
Create a reset password flow with a reset component and a password and password confirm form that posts to reset using token from the route; on success, go to login.
Welcome, in this course you will learn how to authenticate using Angular and Go (Golang) with Fiber Framework.
In Go you will learn:
Use the Fiber framework inspired by express.js
Create public and secure routes
Connect with MySQL
Run Migrations
Validate Requests
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.