In this tutorial, we will learn how to securely reset a password by consuming Laravel 7 JWT auth API with Angular.

This is the second tutorial of Laravel JWT authentication, and preferably we will learn how to create a password reset functionality in Angular using Laravel 7 REST API.

Reset password is ah act of cancelling the existing password for a specific account at a website, service, or device, and then generating a new one.

Tutorial Objective

  • Create two laravel APIs, for making a reset password request other for resetting the password.
  • Handle password reset request with the token, to restrain redundancy.
  • Send password reset mail via mailtrap.io in laravel with a valid token.
  • Handle laravel API through angular service with full-on consensus between backend and frontend.

Table of Contents

  1. Clone Laravel Token-Based Authentication Repo
  2. Configure Mailtrap
  3. Reset Password Request
  4. Reset Password

Clone Laravel Token-Based Authentication Repo

To comprehend or even start working on the pre-built repo, kindly clone the repo using the following command:

git clone https://github.com/SinghDigamber/laravel-angular-jwt-auth.git

BashCopy

The project simultaneously contains backend (Laravel) and frontend (Angular) folders, write your code accordingly.

A quick recap about the topics that we have covered in laravel authentication project.

  • User login and signup in laravel and angular.
  • Building secure laravel API for secure user authentication using JWT token.
  • Password hashing to store the password securely.
  • Consuming the laravel API in an angular app.
  • Set JWT token in headers while logging in.
  • Refresh token at a specific interval to add the security.
  • Logout from laravel app.

To assimilate the entire authentication process, please read this whole article:

JWT Authentication in Laravel with Angular: User Authentication & Registration

#angular #laravel #jwt #api #angular

Angular and Laravel 7 Password Reset for JWT Tutorial
33.75 GEEK