🔐 nuxt-auth is an authentication package for Nuxt 3. It provides oauth sign-in, credential sign-in and magic-email sign-in flows. Read more: https://sidebase.io/nuxt-auth/getting-started
This is release v0.6.0 of the nuxt-auth
module. Notably, it introduces:
- static Nuxt 3 app support
local
provider support- multi-provider support to facilitate the above -> extensible for future providers
- new and improved docs
To use the new version follow the installation instructions. Here's a small spoiler of what the new module has in store:
Example: Provider authjs
This is what <= v0.5 used as the only possible provider.
export default defineNuxtConfig({
modules: ['@sidebase/nuxt-auth'],
auth: {
provider: {
type: 'authjs'
}
}
})
Example: Provider local
This is the new provider that supports static username + password flows. Static OAuth is not yet supported.
export default defineNuxtConfig({
modules: ['@sidebase/nuxt-auth'],
auth: {
provider: {
type: 'local'
}
}
})
Breaking changes?
There's a few breaking changes in comparison to v0.5.0 of the module. If you are used to v0.5 or below the biggest change will be:
- the module-config-structure.
- using
authjs
to identifynext-auth
What's Changed
- Docs: improve guest mode example by @KoenCa in #327
- Add initial multi-provider support - supported: authjs + local providers by @BracketJohn in #317
- release: 0.6.0-alpha.0 by @BracketJohn in #328
- fix: imports not beyong runtime level by @BracketJohn in #329
- fix(docs): all links now point to v0.6 and not 0.6 by @BracketJohn in #330
- release: 0.6.0-alpha.1 by @BracketJohn in #331
- docs: add azure AD example by @thomasfjordside in #332
- Improve v0.6. local provider: correctly bundle types into final package, unset token when getsession fails and more by @BracketJohn in #347
- release: 0.6.0-alpha.2 by @BracketJohn in #348
- avoided calling getSession endpoint when token is absent by @tnt-freskim-veliu in #355
- fix: await for the joinPathToApiURLWN of signinUrl on authjs / useAuth / signIn() / (#359) by @guesant in #360
- release: 0.6.0-beta.0 by @BracketJohn in #362
- Fix mispellings of "immediately". by @KyleSmith0905 in #377
- Make HTTP vs HTTPS port default clear by @drusellers in #353
- fix: #356 - Extend/change local signIn credentials type by @Danielwinkelmann in #375
- fix: Improve typing of sessiondata by @Danielwinkelmann in #376
- fix: Autocomplete for 'auth' middleware in definePageMeta by @mlutsiuk in #379
- release: 0.6.0-beta.1 by @BracketJohn in #380
- fix: runtimeConfig access 'auth' property on top level warning by @mlutsiuk in #381
- docs: improve v0.6 session acccess and management by @BracketJohn in #391
- fix: middleware, status was always 'loading', if no session was set by @Danielwinkelmann in #393
- release: 0.6.0-beta.2 by @BracketJohn in #394
- fix: definePageMeta auth option type by @mlutsiuk in #398
- fix: Fixed Docus runnable locally, outside of
docs/
repo by @zoey-kaiser in #406 - hotfix: Fixed aisde level for 0.6 docs by @zoey-kaiser in #408
- docs: Made NextAuth Link to NextAuthHandler more visable by @zoey-kaiser in #440
- fix: accept boolean value for
globalAppMiddleware
option by @LouisHaftmann in #423 - Fix issue with getToken function and using raw: true in options. by @csprance in #434
- fix: runtimeConfig
auth
key access by @mlutsiuk in #414 - fix(docs): typo by @Hrdtr in #416
- release: 0.6.0-beta.3 by @BracketJohn in #459
- Update 4.custom-session-data.md by @asokr in #458
- docs(fix): dead links by @BracketJohn in #460
- Adds cookie sameSite attribute to config in Local provider by @bmhtech07 in #505
- release: 0.6.0-beta.4 by @zoey-kaiser in #511
- lint: fix: Don't fetch session during nitro prerender by @genu in #521
- release: 0.6.0-beta.5 by @zoey-kaiser in #522
- feat: protected route redirect overwrite per page by @LouisHaftmann in #424
- feat: getSession force refetch option by @LouisHaftmann in #425
- fix: Abort SSR rendering on redirect by @NielsJanssen in #438
- release: 0.6.0-beta.6 by @zoey-kaiser in #534
- docs: Add resouce on how to integrate nuxt-security by @zoey-kaiser in #539
- globalAppMiddleware: true behaves the same as globalAppMiddleware: { isEnabled: true } by @Timbological in #528
- fix:
navigateTo
throws error on local provider by @zoey-kaiser in #540 - release: 0.6.0-beta.7 by @zoey-kaiser in #542
- Adds default & example to token.maxAgeInSeconds by @bmhtech07 in #547
- fix: Do not block the login page in
globalMiddleware
by @zoey-kaiser in #543 - release: 0.6.0-rc.0 by @zoey-kaiser in #550
- feat: add set and clear token methods by @IsraelOrtuno in #554
- feat: Added option to set
callbackUrl
as external by @zoey-kaiser in #556 - release:
0.6.0-rc.1
by @zoey-kaiser in #557 - docs: Make
0.6.0
docs main documentation by @zoey-kaiser in #566 - docs: Last fixes to 0.6.0 docs by @zoey-kaiser in #569
- release: 0.6.0 by @zoey-kaiser in #570
New Contributors
- @KoenCa made their first contribution in #327
- @thomasfjordside made their first contribution in #332
- @tnt-freskim-veliu made their first contribution in #355
- @guesant made their first contribution in #360
- @KyleSmith0905 made their first contribution in #377
- @drusellers made their first contribution in #353
- @Danielwinkelmann made their first contribution in #375
- @mlutsiuk made their first contribution in #379
- @LouisHaftmann made their first contribution in #423
- @csprance made their first contribution in #434
- @Hrdtr made their first contribution in #416
- @asokr made their first contribution in #458
- @bmhtech07 made their first contribution in #505
- @genu made their first contribution in #521
- @NielsJanssen made their first contribution in #438
- @Timbological made their first contribution in #528
- @IsraelOrtuno made their first contribution in #554
Full Changelog: 0.5.0...0.6.0