phase 6 เบื้องต้น

This commit is contained in:
Suphonchai Phoonsawat 2026-08-20 06:20:16 +07:00
parent 1bb850c6b8
commit 93570d38d8
20 changed files with 1715 additions and 34 deletions

View file

@ -0,0 +1,8 @@
/**
* ต่ออายุ session ตอนแอป boot (client เท่านั้น) — ถ้ามี refresh token ใน sessionStorage
* ก็ได้ access token กลับมาโดยไม่ต้อง redirect ไป Keycloak ใหม่
* เป็น async plugin เพื่อรอผลก่อนหน้าแรก render (กัน UI กระพริบไปหน้า login แป๊บนึง)
*/
export default defineNuxtPlugin(async () => {
await useAuth().restoreSession()
})