Skip to content

Releases: sidebase/nuxt-auth

0.8.1

18 Jul 18:39
429b615
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.8.0...0.8.1

0.8.0

04 Jul 16:36
b2ad71a
Compare
Choose a tag to compare

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.

  • init will be called when the nuxt application is mounted. Here you may add event listeners and initialize custom refresh behaviour. The method will receive a RefreshHandlerConfig. The type consists of enablePeriodically & enableOnWindowFocus.
  • destroy will 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

New Contributors

Full Changelog: 0.7.2...0.8.0

0.8.0-rc.1

28 Jun 06:55
cb3db19
Compare
Choose a tag to compare
0.8.0-rc.1 Pre-release
Pre-release

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.

  • init will be called when the nuxt application is mounted. Here you may add event listeners and initialize custom refresh behaviour. The method will receive a RefreshHandlerConfig. The type consists of enablePeriodically & enableOnWindowFocus.
  • destroy will 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

New Contributors

Full Changelog: 0.8.0-alpha.3...0.8.0-rc.1

0.8.0-alpha.3

27 Jun 19:43
b333607
Compare
Choose a tag to compare
0.8.0-alpha.3 Pre-release
Pre-release

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.

  • init will be called when the nuxt application is mounted. Here you may add event listeners and initialize custom refresh behaviour. The method will receive a RefreshHandlerConfig. The type consists of enablePeriodically & enableOnWindowFocus.
  • destroy will 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 refreshHandler and 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

Full Changelog: 0.8.0-alpha.2...0.8.0-alpha.3

0.8.0-alpha.2

23 May 11:09
da1250b
Compare
Choose a tag to compare
0.8.0-alpha.2 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 0.8.0-alpha.1...0.8.0-alpha.2

0.8.0-alpha.1

10 May 12:33
e65d67e
Compare
Choose a tag to compare
0.8.0-alpha.1 Pre-release
Pre-release

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

New Contributors

Full Changelog: 0.7.2...0.8.0-alpha.1

0.7.2

18 Apr 13:01
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.7.1...0.7.2

0.7.1

05 Apr 22:00
Compare
Choose a tag to compare

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

Full Changelog: 0.7.0...0.7.1

0.7.0

07 Mar 15:21
454f5a0
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.6.7...0.7.0

0.7.0-rc.0

07 Mar 14:06
719712a
Compare
Choose a tag to compare
0.7.0-rc.0 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 0.6.7...0.7.0-rc.0