Subscribe to the sanctum:login hook which triggers once the user is logged in and the identity refresh request is completed.
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.hook('sanctum:login', () => {
console.log('Sanctum login hook triggered')
})
})
Here is what the hook looks like
interface RuntimeNuxtHooks {
/**
* Triggers when user successfully logs in.
*/
'sanctum:login': () => HookResult
}