Minimal Auth module for Nuxt 3.
MIT License
Bot releases are visible (Hide)
Published by Atinux 4 months ago
Published by Atinux 4 months ago
We added support for hybrid rendering (#104), learn more in our updated documentation.
It also come with a <AuthState>
component.
Published by Atinux 5 months ago
@nuxt/module-builder
(c9e4ff7)Published by Atinux 6 months ago
Published by Atinux 6 months ago
requireUserSession
for error message and status code customization (015e847)Published by Atinux 7 months ago
redirectUrl
to OAuthMicrosoftConfig for HTTP vs HTTPS Handling (50ba6fe)Published by Atinux 7 months ago
Published by Atinux 8 months ago
Published by Atinux 8 months ago
You should now declare UserSession and User separated:
// auth.d.ts
declare module '#auth-utils' {
interface User {
id: number
name: string
}
interface UserSession {
loggedInAt: number
}
}
export {}
Published by Atinux 8 months ago
redirectUrl
type (#52)Published by Atinux 9 months ago
Published by Atinux 10 months ago
Full Changelog: https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.13...v0.0.14
Published by Atinux 10 months ago
Published by Atinux 10 months ago
Published by Atinux 10 months ago
Add sessionHooks
to extend or invalidate user sessions, as well as logging:
// server/plugins/session.ts
export default defineNitroPlugin(() => {
sessionHooks.hook('fetch', async (session, event) => {
// extend User Session by calling your database
// or
// throw createError({ ... }) if session is invalid for example
})
sessionHooks.hook('clear', async (session, event) => {
// Log that user logged out
})
})
Published by Atinux 11 months ago
Full Changelog: https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.9...v0.0.10
Published by Atinux 11 months ago