Add important documentation

This commit is contained in:
René Preuß
2023-02-18 14:45:14 +01:00
parent c954054621
commit 15c3d43831
2 changed files with 13 additions and 1 deletions

View File

@@ -25,7 +25,9 @@ yarn add --dev @bitinflow/nuxt-oauth
npm install --save-dev @bitinflow/nuxt-oauth
```
2. Add `@bitinflow/nuxt-oauth` to the `modules` section of `nuxt.config.ts`
2. Add `@bitinflow/nuxt-oauth` to the `modules` section of `nuxt.config.ts` and disable `ssr`.
Or alternatively disable `ssr` via `routeRules`, only for pages where `auth` or `guest` middlewares are needed. Typically account section and login page.
```js
export default defineNuxtConfig({
@@ -33,6 +35,13 @@ export default defineNuxtConfig({
'@bitinflow/nuxt-oauth'
],
ssr: false,
// or
routeRules: {
'/account/**': { ssr: false },
'/auth/**': { ssr: false }
},
oauth: {
redirect: {
login: '/login',