2025-01-01
4420
#laravel
Clara Ekekenta
104406
Jan 1, 2025 ⋅ 15 min read

Implementing JWT authentication in Laravel 11

Clara Ekekenta Software Engineer and perpetual learner with a passion for OS and expertise in Python, JavaScript, Go, Rust, and Web 3.0.

Recent posts:

what's new in deno 2.4

Deno 2.4 is here: What’s new and what to expect

Deno 2.4 isn’t just a maintenance update; it’s a statement. Learn about the most impactful changes in Deno 2.4, including the return of a first-party bundler and new spec-aligned ways to handle assets.

Ikeh Akinyemi
Jul 24, 2025 ⋅ 5 min read
Migrating Tanstack Start From Vinxi To Vite

Migrating Tanstack Start from Vinxi to Vite

Update your TanStack Start project from Vinxi to a Vite-based setup, including dependency adjustments and configuration file updates.

David Omotayo
Jul 24, 2025 ⋅ 6 min read
AI roundtable AI proof skills

What are the AI-proof skills every frontend developer needs?

The AI freight train shows no signs of slowing down. Seven senior developers discuss how frontend devs can make themselves indispensable in the age of AI.

Matt MacCormack
Jul 23, 2025 ⋅ 4 min read

Angular has grown up — and the best is yet to come

It’s never been a better time to be an Angular developer. Reflect on the highlights of Angular’s evolution from its early days to the recent v20 release.

Lewis Cianci
Jul 22, 2025 ⋅ 10 min read
View all posts

18 Replies to "Implementing JWT authentication in Laravel 11"

  1. Thanks, appreciate the effort to run a quick example – will be using jst for a mobile application and this is perfect for a quick start to get the auth out of the way.

  2. I followed the tutorial and it works great, except that my todo endpoints are not protected at all. Every todo endpoint works fine without the Bearer token. 🙁

  3. how to prevent access api/todos after runing api logout with message like this
    return response()->json([
    ‘status’ => ‘error’,
    ‘message’ => ‘Unauthorized’
    ]);

  4. Is there a way to authenticate only with a token and not to first need to login with user/pass credentials? Here i see the login method needs the credentials. So whether JWT, Sanctum or Passport…i always need to login with credentials.

Leave a Reply