From 94a99f3cdcf07cf5e317088fd3fb36bcf7bb9e06 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 6 Nov 2023 17:26:20 +0100 Subject: [PATCH] docs: typos --- docs/nuxt/auth.md | 7 +++++-- packages/nuxt/CHANGELOG.md | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/nuxt/auth.md b/docs/nuxt/auth.md index b069e709..4ec244eb 100644 --- a/docs/nuxt/auth.md +++ b/docs/nuxt/auth.md @@ -79,14 +79,14 @@ onMounted(() => { ## Session Cookie -When doing SSR and if a service account is provided, Nuxt VueFire automatically mints a cookie when the user logs in. This cookie is passed to each request and allows the server to authenticate the user while rendering the page, limiting what the user can see based on their permissions. +When doing SSR and if a service account is provided, Nuxt VueFire can automatically mint a cookie when the user logs in. This cookie is passed to each request and allows the server to authenticate the user while rendering the page, limiting what the user can see based on their permissions. In order to use this feature, you must provide a service account and ensure you have the correct permissions set in your Google Cloud project: - Enable the IAM Service Account Credentials API on the [Google Cloud console](https://console.cloud.google.com/apis/api/iamcredentials.googleapis.com/overview). - Once activated, add a _specific role_ to your service account. Find the details in [the Firebase documentation](https://firebase.google.com/docs/auth/admin/create-custom-tokens#iam_api_not_enabled). -Some projects do not need to render pages with different permissions based on the user. In that case, you can disable the session cookie by setting `sessionCookie` to `false` in `nuxt.config.ts`: +Then you should enable the session cookie by setting `sessionCookie` to `true` in `nuxt.config.ts`: ```ts{7} export default defineNuxtConfig({ @@ -95,8 +95,11 @@ export default defineNuxtConfig({ // ensures the auth module is enabled auth: { enabled: true + // enables the sessionCookie sessionCookie: true }, }, }) ``` + +This is useful in projects that render pages with different permissions based on the user. Otherwise, it's not worth enabling. diff --git a/packages/nuxt/CHANGELOG.md b/packages/nuxt/CHANGELOG.md index c5c917d6..a6d4a5c0 100644 --- a/packages/nuxt/CHANGELOG.md +++ b/packages/nuxt/CHANGELOG.md @@ -11,7 +11,7 @@ ### BREAKING CHANGES - **auth:** The session cookie feature is now disabled by default. - It must be explicitely enabled alongside `auth`. If you were using SSR, + It must be explicitly enabled alongside `auth`. If you were using SSR, change your `vuefire` config in `nuxt.config.ts`: ```diff