mirror of
https://github.com/bitinflow/nuxt-oauth.git
synced 2026-03-13 13:45:59 +00:00
Add important documentation
This commit is contained in:
11
README.md
11
README.md
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user