|
| 1 | +# Upgrade to 0.10.0 |
| 2 | + |
| 3 | +> This release contains breaking changes for the default middleware and the configuration of `baseURL` and `AUTH_ORIGIN` |
| 4 | +
|
| 5 | +## Installation |
| 6 | + |
| 7 | +::: code-group |
| 8 | + |
| 9 | +```bash [npm] |
| 10 | +npm i -D @sidebase/nuxt-auth@^0.10.0 |
| 11 | +``` |
| 12 | + |
| 13 | +```bash [pnpm] |
| 14 | +pnpm i -D @sidebase/nuxt-auth^0.10.0 |
| 15 | +``` |
| 16 | + |
| 17 | +```bash [yarn] |
| 18 | +yarn add --dev @sidebase/nuxt-auth^0.10.0 |
| 19 | +``` |
| 20 | + |
| 21 | +::: |
| 22 | + |
| 23 | +## Breaking Changes |
| 24 | + |
| 25 | +### Renaming of default middleware |
| 26 | + |
| 27 | +In 0.10.0 we renamed the included middleware from `auth` to `sidebase-auth`. This is a quality of life change to allow developers to create their own custom middleware named `auth.global.ts` without conflicting with the provided middleware. |
| 28 | + |
| 29 | +If you use the auth middleware inline on any of your pages you will need to rename it: |
| 30 | + |
| 31 | +```vue diff |
| 32 | +<script lang="ts" setup> |
| 33 | +definePageMeta({ |
| 34 | + middleware: 'auth', // [!code --] |
| 35 | + middleware: 'sidebase-auth', // [!code ++] |
| 36 | +}) |
| 37 | +</script> |
| 38 | +
|
| 39 | +<template> |
| 40 | + Only I am protected! |
| 41 | +</template> |
| 42 | +``` |
| 43 | + |
| 44 | +### Adjustments to the computation of `baseURL` and `AUTH_ORIGIN` |
| 45 | + |
| 46 | +In 0.10.0 we spent a considerable amount of time reworking how @sidebase/nuxt-auth determine which endpoints to make requests to. If you would like to view the full PR and discussion, you can find it [here](https://github.com/sidebase/nuxt-auth/pull/913). |
| 47 | + |
| 48 | +As a quick overview, @sidebase/nuxt-auth will now use the following logic to determine where to make requests to: |
| 49 | +- |
| 50 | + |
| 51 | +## Changelog |
| 52 | + |
| 53 | +* fix(#834): Do not refresh on window focus for unprotected pages by @YoshimiShima in https://github.com/sidebase/nuxt-auth/pull/858 |
| 54 | +* chore: add metadata fields to package.json by @MuhammadM1998 in https://github.com/sidebase/nuxt-auth/pull/864 |
| 55 | +* fix(#860): make node version requirement less strict by @phoenix-ru in https://github.com/sidebase/nuxt-auth/pull/865 |
| 56 | +* docs: Add recipes section and copy old recipes by @zoey-kaiser in https://github.com/sidebase/nuxt-auth/pull/868 |
| 57 | +* chore: add plausible site analytics by @zoey-kaiser in https://github.com/sidebase/nuxt-auth/pull/869 |
| 58 | +* feat(#673, #523, #848): back-port authjs migration by @phoenix-ru in https://github.com/sidebase/nuxt-auth/pull/849 |
| 59 | +* feat(#821): Unify `local` and `refresh` providers into one by @zoey-kaiser in https://github.com/sidebase/nuxt-auth/pull/822 |
| 60 | +* chore: updated ESLint and general housekeeping by @zoey-kaiser in https://github.com/sidebase/nuxt-auth/pull/853 |
| 61 | +* chore: update docs for `0.9.0` by @zoey-kaiser in https://github.com/sidebase/nuxt-auth/pull/873 |
| 62 | + |
| 63 | +**Full Changelog**: https://github.com/sidebase/nuxt-auth/compare/0.8.2...0.9.0 |
0 commit comments