Skip to content

Commit 707bcfd

Browse files
committed
Began writing upgrade guide for 0.10.0
1 parent 03daf87 commit 707bcfd

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed

docs/.vitepress/routes/sidebar/upgrade.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ export const routes: DefaultTheme.SidebarItem[] = [
55
text: 'Versions',
66
base: '/upgrade',
77
items: [
8+
{
9+
text: 'Version 0.10.0',
10+
link: '/version-0.10.0'
11+
},
812
{
913
text: 'Version 0.9.0',
1014
link: '/version-0.9.0'

docs/upgrade/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ title: 'Redirecting'
33
editLink: false
44
---
55

6-
<meta http-equiv="refresh" content="0;URL='/upgrade/version-0.9.0'" />
6+
<meta http-equiv="refresh" content="0;URL='/upgrade/version-0.10.0'" />

docs/upgrade/version-0.10.0.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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

Comments
 (0)