Skip to content

Commit

Permalink
docs: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Nov 6, 2023
1 parent 6a2f4a4 commit 94a99f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docs/nuxt/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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.
2 changes: 1 addition & 1 deletion packages/nuxt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94a99f3

Please sign in to comment.