Skip to content

Commit 4808941

Browse files
authored
docs: adjust wording about Nuxt 3 / 4 compatibility (#1072)
1 parent 33873aa commit 4808941

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</p>
2929
<!-- Badges End -->
3030

31-
> Authentication built for Nuxt 3! Easily add authentication via OAuth providers, credentials or Email Magic URLs!
31+
> Authentication built for Nuxt 3+! Easily add authentication via OAuth providers, credentials or Email Magic URLs!
3232
3333
## Quick Start
3434

@@ -62,8 +62,8 @@ Then visit the [Quick Start documentation](https://auth.sidebase.io/guide/gettin
6262

6363
## Features
6464

65-
`@sidebase/nuxt-auth` is a library with the goal of supporting authentication for any universal Nuxt 3 application. At the moment three providers are supported:
66-
- [`authjs`](https://auth.sidebase.io/guide/authjs/quick-start): for non-static apps that want to use [Auth.js / NextAuth.js](https://github.com/nextauthjs/next-auth) to offer the reliability & convenience of a 23k star library to the Nuxt 3 ecosystem with a native developer experience (DX)
65+
`@sidebase/nuxt-auth` is a library with the goal of supporting authentication for any universal Nuxt 3+ application. At the moment three providers are supported:
66+
- [`authjs`](https://auth.sidebase.io/guide/authjs/quick-start): for non-static apps that want to use [Auth.js / NextAuth.js](https://github.com/nextauthjs/next-auth) to offer the reliability & convenience of a 23k star library to the Nuxt 3+ ecosystem with a native developer experience (DX)
6767
- [`local`](https://auth.sidebase.io/guide/local/quick-start): for static pages that rely on an external backend with a credential flow for authentication. The Local Provider also supports refresh tokens since `v0.9.0`. Read more [here](https://auth.sidebase.io/upgrade/version-0.9.0).
6868

6969
You can find a full list of our features, as well as which provider supports each feature [on our docs](https://auth.sidebase.io/guide/getting-started/choose-provider).
@@ -142,9 +142,9 @@ We have one playground per provider:
142142
- [`authjs`](./playground-authjs)
143143
- [`local`](./playground-local)
144144

145-
##### How to test static Nuxt 3 apps?
145+
##### How to test static Nuxt 3+ apps?
146146

147-
To test static Nuxt 3 apps we want to run a static frontend and a separate backend that will take over authentication:
147+
To test static Nuxt 3+ apps we want to run a static frontend and a separate backend that will take over authentication:
148148
1. `playground-local/nuxt.config.ts`: Add `baseURL: 'http://localhost:3001'` to the `auth`-config
149149
2. Start the static frontend:
150150
```sh
@@ -171,7 +171,7 @@ Thank you to everyone who has contributed to this project by writing issues or o
171171

172172
## Acknowledgments
173173

174-
`@sidebase/nuxt-auth` is supported by all of our amazing contributors and the [Nuxt 3 team](https://nuxters.nuxt.com/)!
174+
`@sidebase/nuxt-auth` is supported by all of our amazing contributors and the [Nuxt 3+ team](https://nuxters.nuxt.com/)!
175175

176176
<a href="https://github.com/sidebase/nuxt-auth/graphs/contributors">
177177
<img src="https://contrib.rocks/image?repo=sidebase/nuxt-auth" />

docs/.vitepress/config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { headConfig, sitemapConfig } from './head'
66
export default defineConfig({
77
title: 'NuxtAuth',
88
titleTemplate: ':title - by sidebase',
9-
description: 'Authentication for Nuxt 3',
9+
description: 'Authentication for Nuxt',
1010
base: '/',
1111
cleanUrls: true,
1212
lang: 'en-US',

docs/.vitepress/head.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const sitemapConfig = {
1010
export const headConfig: HeadConfig[] = [
1111
['link', { rel: 'icon', href: '/favicon.ico' }],
1212
['meta', { name: 'theme-color', content: '#30A36C' }],
13-
['meta', { property: 'og:title', content: 'NuxtAuth | Authentication for Nuxt 3' }],
13+
['meta', { property: 'og:title', content: 'NuxtAuth | Authentication for Nuxt' }],
1414
['meta', { property: 'og:description', content: 'User authentication and sessions via authjs' }],
1515
['meta', { property: 'og:site_name', content: 'NuxtAuth' }],
1616
['meta', { property: 'og:type', content: 'website' }],

docs/guide/authjs/server-side/session-access.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default eventHandler(async (event) => {
1313
This is inspired by [the `getServerSession`](https://next-auth.js.org/tutorials/securing-pages-and-api-routes#securing-api-routes) of NextAuth.js. It also avoids an external HTTP `GET` request to the `/api/auth/sessions` endpoint, instead directly calling a pure JS-method.
1414

1515
:::warning Note:
16-
If you use [Nuxt's `useFetch`](https://nuxt.com/docs/api/composables/use-fetch) from your app-components to fetch data from an endpoint that uses `getServerSession` or `getToken` you will need to manually pass along cookies as [Nuxt 3 universal rendering](https://nuxt.com/docs/guide/concepts/rendering#universal-rendering) will not do this per-default when it runs on the server-side. Not passing along cookies will result in `getServerSession` returning `null` when it is called from the server-side as no auth cookies will exist. Here's an example that manually passes along cookies:
16+
If you use [Nuxt's `useFetch`](https://nuxt.com/docs/api/composables/use-fetch) from your app-components to fetch data from an endpoint that uses `getServerSession` or `getToken` you will need to manually pass along cookies as [Nuxt universal rendering](https://nuxt.com/docs/guide/concepts/rendering#universal-rendering) will not do this per-default when it runs on the server-side. Not passing along cookies will result in `getServerSession` returning `null` when it is called from the server-side as no auth cookies will exist. Here's an example that manually passes along cookies:
1717
```ts
1818
const headers = useRequestHeaders(['cookie']) as HeadersInit
1919
const { data: token } = await useFetch('/api/token', { headers })

docs/guide/getting-started/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction
22

3-
NuxtAuth is an open source Nuxt module that provides authentication for Nuxt 3 applications. It supports multiple authentication methods, allowing you to customize the ways users login to your application.
3+
NuxtAuth is an open source Nuxt module that provides authentication for Nuxt 3+ applications. It supports multiple authentication methods, allowing you to customize the ways users login to your application.
44

55
Through a direct integration into Nuxt, you can access and utlize the user sessions within your pages, components and composables directly.
66

@@ -28,9 +28,9 @@ Through a direct integration into Nuxt, you can access and utlize the user sessi
2828

2929
### Why does NuxtAuth require NextAuth?
3030

31-
The `authjs` provider is able to provide all of its features by wrapping [Auth.js / NextAuth.js](https://github.com/nextauthjs/next-auth) under the hood. This gives the reliability & convenience of a >22.000 github star library to the Nuxt 3 ecosystem with a native nuxt developer experience (DX). Wrapping Auth.js / NextAuth.js has the second advantage that many OAuth providers, database adapters, callbacks and more are supported out-of-the-box. This also means that you can use all NextAuth.js and Auth.js guides and documentation to achieve things with the authjs provider of nuxt-auth.
31+
The `authjs` provider is able to provide all of its features by wrapping [Auth.js / NextAuth.js](https://github.com/nextauthjs/next-auth) under the hood. This gives the reliability & convenience of a >22.000 github star library to the Nuxt 3+ ecosystem with a native nuxt developer experience (DX). Wrapping Auth.js / NextAuth.js has the second advantage that many OAuth providers, database adapters, callbacks and more are supported out-of-the-box. This also means that you can use all NextAuth.js and Auth.js guides and documentation to achieve things with the authjs provider of nuxt-auth.
3232

33-
NuxtAuth also provides Nuxt 3 specific features like a convenient application-side composable to login, logout, access user-authentication data or an authentication middleware and plugin that take care of managing the user authentication lifecycle by fetching authentication data on initial load, refreshing the user authentication on re-focusing the tab and more.
33+
NuxtAuth also provides Nuxt 3+ specific features like a convenient application-side composable to login, logout, access user-authentication data or an authentication middleware and plugin that take care of managing the user authentication lifecycle by fetching authentication data on initial load, refreshing the user authentication on re-focusing the tab and more.
3434

3535
### What is the difference between Auth.js and NextAuth?
3636

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Auth
55

66
hero:
77
name: NuxtAuth
8-
text: Authentication for Nuxt 3!
8+
text: Authentication for Nuxt!
99
tagline: User authentication and sessions via authjs!
1010
actions:
1111
- theme: brand
@@ -22,7 +22,7 @@ features:
2222
- icon:
2323
src: /icons/Github.png
2424
title: OAuth
25-
details: Effortlessly connect your Nuxt 3 application with Google, Github, Azure and countless others.
25+
details: Effortlessly connect your Nuxt 3+ application with Google, Github, Azure and countless others.
2626
- icon:
2727
src: /icons/Database.png
2828
title: Use your own backend

docs/recipes/introduction/welcome.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Recipes
22

3-
The following pages contain recipes for commonly asked patterns, questions, and implementations. The recipes are mostly provided by the community and can serve as guidelines to implement something similar in your Nuxt 3 application.
3+
The following pages contain recipes for commonly asked patterns, questions, and implementations. The recipes are mostly provided by the community and can serve as guidelines to implement something similar in your Nuxt 3+ application.
44

55
## What are recipes?
66

docs/resources/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ There are some terms we use in this documentation that may not be known to every
1515

1616
## Module Concept
1717

18-
The idea of this library is to re-use all the open-source implementation that already exist in the JS ecosystem instead of rolling our own. The idea was born when researching through the ecosystem of framework-specific authentication libraries to figure out what the best implementation approach for a state-of-the-art Nuxt 3 authentication library would be.
18+
The idea of this library is to re-use all the open-source implementation that already exist in the JS ecosystem instead of rolling our own. The idea was born when researching through the ecosystem of framework-specific authentication libraries to figure out what the best implementation approach for a state-of-the-art Nuxt 3+ authentication library would be.
1919

2020
During research it became clear that implementing everything from scratch will be:
2121
- a lot of work that has already been open-sourced by others,
@@ -30,6 +30,6 @@ In our investigation we found prior attempts to make NextAuth.js framework agnos
3030
- [NextAuth.js app examples](https://github.com/nextauthjs/next-auth/tree/main/apps)
3131
- [Various comments, proposals, ...or this thread](https://github.com/nextauthjs/next-auth/discussions/3942), special thanks to [brillout](https://github.com/brillout) for starting the discussion, [balazsorban44](https://github.com/balazsorban44) for NextAuth.js and encouraging the discussion, [wobsoriano](https://github.com/wobsoriano) for adding PoCs for multiple languages
3232

33-
The main part of the work was to piece everything together, resolve some outstanding issues with existing PoCs, add new things where nothing existed yet, e.g., for the `useAuth` composable by going through the NextAuth.js client code and translating it to a Nuxt 3 approach.
33+
The main part of the work was to piece everything together, resolve some outstanding issues with existing PoCs, add new things where nothing existed yet, e.g., for the `useAuth` composable by going through the NextAuth.js client code and translating it to a Nuxt 3+ approach.
3434

3535
The module had another big iteration in collaboration with [JoaoPedroAS51](https://github.com/JoaoPedroAS51) to make `useAuth` a sync operation and trigger the session lifecycle from a plugin rather than the `useAuth` composable itself.

0 commit comments

Comments
 (0)