Authentication

Authentication

9 Series
41 Lessons
18h 45m

AdonisJS Auth provides first-party support for authentication to AdonisJS. It supports sessions, API tokens, and basic authentication formats. API tokens can be database or Redis-driven. Auth integrates deeply within the HttpContext and Edge.

Series.

Lessons.

Video preview
Adocasts Plus Exclusive
Exclusive
Listing Access Tokens

Listing an Organization's Access Tokens

In this lesson, we'll query all of our organization's access tokens and filter out any tokens that are expired. Then, we'll list the organization's tokens showing it's name, abilities, when it was created, and when it was last used.

Video preview
OAT vs JWT

Opaque Access Tokens (OAT) vs JSON Web Tokens (JWT)

In this lesson, we'll take a step back to understand the differences between the tokens we're using, which are Opaque Access Tokens (OAT), and JSON Web Tokens (JWT). We'll discuss security, scalability, and what makes up each token.

Video preview
Creating Access Tokens Part 1: AdonisJS

Creating Access Tokens Part 1: AdonisJS

In this lesson, we'll add a route to the settings portion of our application allowing the user to create an opaque access token (OAT), with the desired permissions, for the active organization.

Video preview
Access Token Abilities

Defining Access Token Abilities & DTO

In this lesson, we'll finish up our preparation work by creating a data transfer object (DTO) for our access tokens. Then, we'll define what our token abilities will be within our application's API.

Video preview
Separation of Concerns

Separation of API & Web Auth Guard Concerns

In this lesson, we'll restrict our routes to their applicable authentication guard. Ensuring our web routes can properly authorize using their role-based authorization and our API can properly authorize using our access token abilities.

Video preview
Configuring Api Authentication

Configuring Access Token Auth on top of Session Auth

In this lesson, we'll get opaque access tokens configured within our AdonisJS application on top of the already configured session/web authentication. This will include configuring the guard and setting up the db access token provider.

Video preview
Adocasts Plus Exclusive
Exclusive
Reset Rate Limits on Password Reset

Clearing Login Attempt Rate Limits on Password Reset

In this lesson, we'll finish our authentication rate limiting flow by clearing out any rate limits counting against the user when they reset their password.

Video preview
Adocasts Plus Exclusive
Exclusive
Rate Limiting Login Attempts

Restricting Login Attempts with Rate Limiting

In this lesson, we'll add AdonisJS' Rate Limiter to our web login action to restrict the number of times a user can attempt to login to our application with invalid credentials.

Video preview
Adocasts Plus Exclusive
Exclusive
Social Authentication with AdonisJS Ally & Google
AdonisJS In 30 #9.0
・
Nov 06, 24

How To Add Social Authentication with AdonisJS Ally & Google

In this lesson, we'll learn how we can use AdonisJS Ally to add social authentication to our applications. We'll use Google for our demonstration, but this same process also applies to GitHub, Facebook, Discord, LinkedIn, Twitter, & more

Video preview
Adocasts Plus Exclusive
Exclusive
Forgot Password
Building with AdonisJS & Inertia #5.6
・
Oct 21, 24

Forgot Password & Password Reset

In this lesson, we'll walk through setting up the complete forgot password flow including, creating a password reset token with time-expiry, sending an email notification with a password reset link, verifying the token, and resetting the users password.

Video preview
Adocasts Plus Exclusive
Exclusive
Remember Me Token
Building with AdonisJS & Inertia #5.5
・
Oct 21, 24

Adding the Remember Me Token

In this lesson, we'll enable the remember me feature on our auth login flow and add the remember me tokens table to our database.

Video preview
Adocasts Plus Exclusive
Exclusive
Login & Exceptions
Building with AdonisJS & Inertia #5.4
・
Oct 11, 24

Logging In Users & Displaying Exceptions

In this lesson, we'll add the ability to login to our application. We'll then discuss the differences between errors and errorsBag and how we can display long-lived exception messages as an alternative to our toast manager.

Video preview
Adocasts Plus Exclusive
Exclusive
Onboarding New Users
Building with AdonisJS & Inertia #5.3
・
Oct 11, 24

Onboarding Newly Registered Users

In this lesson, we'll create our onboarding flow for newly registered users. Before users can enter the application, they'll need to have at least one organization set up so everything works smoothly.

Video preview
Adocasts Plus Exclusive
Exclusive
Logging Out Users
Building with AdonisJS & Inertia #5.2
・
Oct 04, 24

Logging Out Users

In this lesson, we'll hook up our logout user menu button to a POST route to logout an authenticated user.

Video preview
Adocasts Plus Exclusive
Exclusive
Register new users
Building with AdonisJS & Inertia #5.0
・
Oct 04, 24

User Registration with InertiaJS

In this lesson, we'll complete our user registration flow by validating our registration form data, creating a new user, logging that user in, and forwarding them to the next page in the flow.

Video preview
Let's Learn AdonisJS 6 #10.0
・
May 23, 24

How to Create and Fix Missing User Profiles in Your Application

Learn how to create and manage user profiles in your application. This tutorial covers adding an edit profile button, setting up routes and controllers, ensuring profile creation during registration, handling existing users without profiles, and verifying

Video preview
AdonisJS 6 Access Token Authentication in 20 Minutes
AdonisJS In 30 #6.0
・
May 21, 24

AdonisJS 6 Access Token Authentication in 20 Minutes

In this lesson, we'll cover how to implement access token authentication, using opaque tokens, in AdonisJS 6. We'll also take a look at what this would look like on the frontend via a Vue 3 app using Pinia

Video preview
Remembering A User's Authenticated Session
Let's Learn AdonisJS 6 #7.5
・
Apr 24, 24

Remembering A User's Authenticated Session

In this lesson, we'll learn how we can use AdonisJS' Remember Me Tokens feature to allow a user to specify they'd like their authentication state to be remembered for a long time across sessions.

Video preview
Logging In An Existing User
Let's Learn AdonisJS 6 #7.4
・
Apr 24, 24

Logging In An Existing User

In this lesson, we'll learn how we can login an existing user using just their email and password. We'll discuss how the AuthFinder mixin protects us from timing attacks, and how we can use it to verify the accuracy of a user's password.

Video preview
Logging Out An Authenticated User
Let's Learn AdonisJS 6 #7.3
・
Apr 24, 24

Logging Out An Authenticated User

In this lesson, we'll learn how to logout an authenticated user using a POST request with CSRF protection.

Showing 1 to 20 of 41 results