Releases: sidebase/nuxt-auth
0.8.0-alpha.3
Upgrade guide
This release contains breaking changes for all providers.
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@sidebase/nuxt-auth'],
auth: {
- session: {
- enableRefreshOnWindowFocus: true,
- enableRefreshPeriodically: 10000,
- refreshHandler: RefreshHandler
- }
+ sessionRefresh: {
+ enableOnWindowFocus: true,
+ enablePeriodically: 10000,
+ refreshHandler: RefreshHandler
+ }
}
})RefreshHandler
In #715, we took the first step to improve the behavior and possibilities to customize the Refresh behaviour of your application. In #766 we finalized these changes and improved the previous configuration options. You can define the location of a custom RefreshHandler inside your Nuxt config under auth.sessionRefresh.refreshHandler.
To customize the session refreshing you can provide a refresh handler. A custom RefreshHandler requires an init- and a destroy-function.
initwill be called when the nuxt application is mounted. Here you may add event listeners and initialize custom refresh behaviour. The method will receive aRefreshHandlerConfig. The type consists ofenablePeriodically&enableOnWindowFocus.destroywill be called when your app is unmounted. Here you may run your clean up routine e.g. to remove your event listeners.
import type { RefreshHandler } from '@sidebase/nuxt-auth'
// You may also use a plain object with `satisfies RefreshHandler`, of course!
class CustomRefreshHandler implements RefreshHandler {
init (): void {
console.info('Use the full power of classes to customize refreshHandler!')
}
destroy (): void {
console.info(
'Hover above class properties or go to their definition ' +
'to learn more about how to craft a refreshHandler'
)
}
}
export default new CustomRefreshHandler()If no custom RefreshHandler is defined, the build-in handler will be used.
What's Changed
- 📝 docs: add session config.md by @blumewas in #758
- docs: fix broken links and minor rewording by @morehawes in #767
- enh(#765): refactor
refreshHandlerand session refreshing; fix refresh provider refreshing by @phoenix-ru in #766 - fix: await sendRedirect in auth handler by @DavidDeSloovere in #769
- fix: Added getCurrentInstance check to conditionally register onMounted in useAuthState. by @cip8 in #771
- release: 0.8.0-alpha.3 by @zoey-kaiser in #778
New Contributors
- @morehawes made their first contribution in #767
- @DavidDeSloovere made their first contribution in #769
- @cip8 made their first contribution in #771
Full Changelog: 0.8.0-alpha.2...0.8.0-alpha.3
0.8.0-alpha.2
What's Changed
- fix: opt in to
import.meta.*properties by @danielroe in #719 - [PR changes #392] feat: move pointer and sessionDataType to the SessionConfig by @valh1996 in #592
- feat: Add support for secure attribute of local/refresh provider cookies by @matteioo in #729
- fix: don't send sign-in options in request payload by @despatates in #755
- fix: fix type generation being faulty by @phoenix-ru in #756
- feat: Add support for custom refresh handling by @blumewas in #715
- release: 0.8.0-alpha.2 by @zoey-kaiser in #757
New Contributors
- @valh1996 made their first contribution in #592
- @matteioo made their first contribution in #729
- @despatates made their first contribution in #755
- @blumewas made their first contribution in #715
Full Changelog: 0.8.0-alpha.1...0.8.0-alpha.2
0.8.0-alpha.1
The road to 0.8.0
Hello everyone 👋
We are currently hard at work finishing up the next major minor release of NuxtAuth 🥳. 0.8 will focus on generally improving and updating the module to be more consistent and faster. In #750 we refactored the internal $fetch calls used in NuxtAuth, this has resulted in a huge performance increase. If you are interested in this, feel free to check out the benchmarks in here.
What's Changed
- Feature: Option to remove server side auth by @KyleSmith0905 in #610
- docs: Added documentation for automatic session refresh by @Hiimphteve in #739
- docs: Adjusted Recommended NextAuth Version by @zoey-kaiser in #741
- fix: fix and improve auto-declaration generation by @phoenix-ru in #747
- feat: Add cookie domain config by @pier-lucRVezy in #736
- fix(types): export interface for module builder type generation by @BobbieGoede in #738
- enh(#742): optimize internal $fetch calls by @phoenix-ru in #750
- release: 0.8.0-alpha.1 by @zoey-kaiser in #752
New Contributors
- @Hiimphteve made their first contribution in #739
- @pier-lucRVezy made their first contribution in #736
- @BobbieGoede made their first contribution in #738
Full Changelog: 0.7.2...0.8.0-alpha.1
0.7.2
What's Changed
- docs: use new
nuxi module addcommand in installation by @danielroe in #724 - chore: bump dependencies by @phoenix-ru in #740
- fix: add set-cookie header for each set-cookie by @hitochan777 in #726
New Contributors
- @hitochan777 made their first contribution in #726
Full Changelog: 0.7.1...0.7.2
0.7.1
What's Changed
- Evaluation of getToken secureCookies parameter does not work as intended by @kwesterfeld2 in #704
- feat(fetch): improve error handling by @devCrossNet in #713
- fix (refresh-token): handle error in refresh-token plugin and fix reshOnlyToken type by @anjarupnik in #667
- feat(#635): allow changing refresh request body via json pointer by @phoenix-ru in #727
New Contributors
- @kwesterfeld2 made their first contribution in #704
- @devCrossNet made their first contribution in #713
Full Changelog: 0.7.0...0.7.1
0.7.0
What's Changed
- Bump dependencies and add
ModuleOptionsNormalizedtype by @phoenix-ru in #665 - fix: add missing imports by @phoenix-ru in #671
- docs: fix response body for local provider by @Syafiqjos in #649
- chore: Update the issue templates by @zoey-kaiser in #682
- fix: Fix Discussions template by @zoey-kaiser in #683
- chore: Add reproduction workflow by @zoey-kaiser in #684
- docs: update local and refresh providers guide by @MuhammadM1998 in #641
- chore: Update the issue templates by @zoey-kaiser in #687
- feat: added token, refreshToken cookieName option by @FAL-coffee in #654
- fix(#523): deduplicate
appendHeaderin auth handler by @phoenix-ru in #693 - chore: fix reproduire label name by @phoenix-ru in #695
- docs: Add missing middleware option for guestmode by @anischihi in #697
- docs: add docs for signUp (local povider) by @Vijayabhaskar96 in #698
- test: add Playwright by @phoenix-ru in #694
- release: 0.7.0-rc.0 by @zoey-kaiser in #705
- release: 0.7.0 by @zoey-kaiser in #706
New Contributors
- @phoenix-ru made their first contribution in #665
- @Syafiqjos made their first contribution in #649
- @MuhammadM1998 made their first contribution in #641
- @FAL-coffee made their first contribution in #654
- @anischihi made their first contribution in #697
- @Vijayabhaskar96 made their first contribution in #698
Full Changelog: 0.6.7...0.7.0
0.7.0-rc.0
What's Changed
- Bump dependencies and add
ModuleOptionsNormalizedtype by @phoenix-ru in #665 - fix: add missing imports by @phoenix-ru in #671
- docs: fix response body for local provider by @Syafiqjos in #649
- chore: Update the issue templates by @zoey-kaiser in #682
- fix: Fix Discussions template by @zoey-kaiser in #683
- chore: Add reproduction workflow by @zoey-kaiser in #684
- docs: update local and refresh providers guide by @MuhammadM1998 in #641
- chore: Update the issue templates by @zoey-kaiser in #687
- feat: added token, refreshToken cookieName option by @FAL-coffee in #654
- fix(#523): deduplicate
appendHeaderin auth handler by @phoenix-ru in #693 - chore: fix reproduire label name by @phoenix-ru in #695
- docs: Add missing middleware option for guestmode by @anischihi in #697
- docs: add docs for signUp (local povider) by @Vijayabhaskar96 in #698
- test: add Playwright by @phoenix-ru in #694
- release: 0.7.0-rc.0 by @zoey-kaiser in #705
New Contributors
- @phoenix-ru made their first contribution in #665
- @Syafiqjos made their first contribution in #649
- @MuhammadM1998 made their first contribution in #641
- @FAL-coffee made their first contribution in #654
- @anischihi made their first contribution in #697
- @Vijayabhaskar96 made their first contribution in #698
Full Changelog: 0.6.7...0.7.0-rc.0
0.6.7
This release reverts the changes made in https://github.com/sidebase/nuxt-auth/releases/tag/0.6.6, which could result in content flashes.
What's Changed
- fix: include hash & query parameters in callbackUrl by @AbdallahAlhaddad in #643
New Contributors
- @AbdallahAlhaddad made their first contribution in #643
Full Changelog: 0.6.5...0.6.6
0.6.6
WARNING: Please do not use this release, as the change in #644 can result in Content flashes on first load. Please skip this release and use 0.6.7!
What's Changed
- feat: Add server check in middleware by @zoey-kaiser in #644
- fix: include hash & query parameters in callbackUrl by @AbdallahAlhaddad in #643
- release: 0.6.6 by @zoey-kaiser in #645
New Contributors
- @AbdallahAlhaddad made their first contribution in #643
Full Changelog: 0.6.5...0.6.6
0.6.5
What's Changed
- fix: move vue server plugin out of
server/directory by @danielroe in #639 - release: 0.6.5 by @zoey-kaiser in #642
Full Changelog: 0.6.4...0.6.5