AdonisJS 5 API & Nuxt 3 SSR Authentication in 15 Minutes

preview_player
Показать описание
In this lesson, we’ll learn how to set up authentication in an AdonisJS API application while using server-side rendered (SSR) Nuxt 3 as our front end.

👍 If You Enjoy This Video, Consider Hitting The Like Button!

🎬 Check Out More Videos Here:

🕑 Chapters
00:00 - Intro
00:25 - Project Overview
00:50 - Configuring Our AdonisJS API
02:40 - Completing Auth API Routes
04:40 - Configuring Our Nuxt App
06:50 - Handling Auth Forms in Nuxt
08:15 - Signing Up A User
08:40 - Fetching Our Authenticated User
10:20 - Proxying Session Cookie with Nuxt Server Requests
12:45 - Signing Out Our Authenticated User
13:20 - Key Points

--------------------------Socials---------------------------

Рекомендации по теме
Комментарии
Автор

That was beautiful 🎉🎉. I was looking to implement this in Sveltekit soon and this has given me a good start. Thanks

discoverlance
Автор

one more question. is it double traffic wasting to use ssr auth?

parmonov
Автор

how about using pinia actions yo make requests with headers?

parmonov
Автор

This is awesome, I have a lot. Can you please do one with adonisjs api tokens,

josephampah
Автор

Great video!!
I ran into a very strange issue, everything works fine, until "user.auth", it returns undefined. I was able to login user, but when running /auth, "user.auth" keep returning undefined. Upon inspecting further, the isLoggedin is set to false as if the login failed, pretty sure "await auth.attempt(uid, password, rememberMe)" works fine, any pointers would be really appreciated.

matianyu