Create Auth hook - User, Loading State, CSRF token | Laravel REST API and Next.js #6

preview_player
Показать описание
In this video, we will create a custom Authentication hook.

Support me:

Join this channel to get access to perks:

Useful Links:

Auth packages:

Playlists:

Timestamps:
00:00 Introduction
00:10 Create auth hook
02:07 Set up auth hook
08:41 Outro

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

Thank you very much. I am following you and am practicing writing Next.js from Video Course Next.js. I am waiting for new video clips from you. 😀

kantarasukansomboon
Автор

Thank you Sir, we really appreciate your effort

bashiruibrahim
Автор

Is it normal for 401 errors to be getting thrown in developer console very few seconds?

Haych_Q
Автор

can you implement typescript with this?

joshuagalit
Автор

Hello AngelJay Academy, where is laravel setup, You title is laravel Api and NEXT js playlist, you have shown only next only

LotusSoftPvtLtd
Автор

Thank you very much Sir.I am waiting for next lesson!! By the way can I get laravel source code

thatnaing
Автор

import { useState, useEffect } from 'react'
import axios from '../lib/axios'
import useSWR from 'swr'

const UseFatchs = (url) => {
const [data, setData] = useState([])
const [loading, setLoading] = useState(false)
const [error, setError] = useState(null)
useEffect(() => {
setLoading(true)
axios.get('/api'+url)
.then((response) => {
setData(response.data)
})
.catch((err) => {
setError(err)
})
.finally(() => {
setLoading(false)
})

}, [url])

return { data, loading, error}
}
export default UseFatchs

this is my code

Danda_Training_by_narendra