Courses

Flutter 3 Mobile App with Laravel 12 API

Using API Authentication Tokens

You're reading a FREE PREVIEW of a PREMIUM course.

Link to the repository

[Only for premium members]

Now that our authentication is completed, we can work on consuming API tokens within our application. Tokens are important to limit access to our application.

In this lesson, we will:

  • Store the token in our Auth Provider
  • Add Headers to our API requests - including the token
  • Refactor our API Service to use the token
  • And some other minor changes

Let's start by refactoring our API service to use the token.


Refactoring API Service - Consuming API Tokens

Currently, we have no way to pass the token to our API service, so let's add that:

Note: We will declare the token as a [non-nullable variable] using the...

The full lesson is only for Premium Members.
Want to access all 26 text lessons of this course? (116 min read)

You also get:

  • 77 courses
  • Premium tutorials
  • Access to repositories
  • Private Discord