Skip to content

Commit f692a5a

Browse files
authored
docs: apply studio formatting
1 parent 65832ba commit f692a5a

File tree

10 files changed

+29
-25
lines changed

10 files changed

+29
-25
lines changed

docs/content/1.getting-started/1.introduction.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Introduction
3-
description: '@nuxtjs/supabase is a Nuxt module for first class integration with Supabase.'
3+
description: "@nuxtjs/supabase is a Nuxt module for first class integration with Supabase."
44
---
55

66
[@nuxtjs/supabase](https://github.com/nuxt-modules/supabase) is a Nuxt module for first class integration with Supabase.
@@ -75,14 +75,14 @@ Default: `true`
7575
7676
Controls whether the module uses cookies to share session info between server and client. You *must* enable this option if you need to access session or user info from the server. It will use the SSR client from the [@supabase/ssr](https://github.com/supabase/ssr) library.
7777
78-
When disabled, the module will use the default Supabase client from the [@supabase/supabase-js](https://github.com/supabase/supabase-js) library which stores session info in local storage. This is useful in certain cases, such as statically generated sites or mobile apps where cookies might not be available.
78+
When disabled, the module will use the default Supabase client from the [@supabase/supabase-js](https://github.com/supabase/supabase-js) library which stores session info in local storage. This is useful in certain cases, such as statically generated sites or mobile apps where cookies might not be available.
7979
8080
::warning
8181
When `useSsrCookies` is `true` the following options cannot be customized with `clientOptions`:
8282
8383
- `flowType`, `autoRefreshToken`, `detectSessionInUrl`, `persistSession`, `storage`
8484
85-
If you need to customize one of the above options, you must set `useSsrCookies` to `false`. Bear in mind that this will disable SSR support, you'll need to take care of it yourself if needed.
85+
If you need to customize one of the above options, you must set `useSsrCookies` to `false`. Bear in mind that this will disable SSR support, you'll need to take care of it yourself if needed.
8686
::
8787
8888
### `redirect`
@@ -109,7 +109,7 @@ Default:
109109
- `callback`: This is the path the user will be redirect to after supabase login redirection. Should match configured `redirectTo` option of your [signIn method](https://supabase.com/docs/reference/javascript/auth-signinwithoauth). Should also be configured in your Supabase dashboard under `Authentication -> URL Configuration -> Redirect URLs`.
110110
- `include`: Routes to include in the redirect. `['/admin(/*)?']` will enable the redirect only for the `admin` page and all sub-pages.
111111
- `exclude`: Routes to exclude from the redirect. `['/foo', '/bar/**']` will exclude the `foo` page and all pages in your `bar` folder.
112-
- `saveRedirectToCookie`: Automatically sets a cookie containing the path an unauthenticated user tried to access. The value can be accessed using the [`useSupabaseCookieRedirect`](/composables/usesupabasecookieredirect) composable to redirect the user to the page they previously tried to visit.
112+
- `saveRedirectToCookie`: Automatically sets a cookie containing the path an unauthenticated user tried to access. The value can be accessed using the [`useSupabaseCookieRedirect`](/composables/usesupabasecookieredirect) composable to redirect the user to the page they previously tried to visit.
113113
114114
### `cookiePrefix`
115115
@@ -198,8 +198,8 @@ Use the `cookieRedirect` option to store the redirect path in a cookie.
198198
199199
## Demo
200200
201-
A live demo is made for you to see this module in action on [https://supabase-demo-gamma.vercel.app](https://supabase-demo-gamma.vercel.app), read more in the [demo section](/getting-started/demo).
201+
A live demo is made for you to see this module in action on <https://supabase-demo-gamma.vercel.app>, read more in the [demo section](/getting-started/demo).
202202
203-
[![Supabase demo with Nuxt 3](/demo.png)](https://supabase-demo-gamma.vercel.app)
203+
![Demo supabase x nuxt](/demo.png){.rounded-lg}
204204
205205
Also checkout the [YouTube video](https://www.youtube.com/watch?v=jIyiRT6zT8Q) about its usage in a live demo.

docs/content/1.getting-started/2.authentication.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Authentication
3-
description: Authenticate your user thanks to the PKCE Oauth protocol that enables secure exchange of refresh and access tokens between an application and the authorization server
3+
description: Authenticate your user thanks to the PKCE Oauth protocol that
4+
enables secure exchange of refresh and access tokens between an application
5+
and the authorization server
46
---
57

68
With the default options, the module requires a log-in page and a confirm page to handle the [PKCE authorization code flow](https://supabase.com/docs/guides/resources/glossary#pkce). If you want to understand how it works under the hood, you can read this [section](https://supabase.com/docs/guides/auth/server-side-rendering#understanding-the-authentication-flow).
@@ -103,5 +105,5 @@ watch(user, () => {
103105
```
104106

105107
::tip
106-
If you want to manually set the redirect path, you can do so by disabling [`saveRedirectToCookie`](/getting-started/introduction#redirectoptions), and then set the value using the [`useSupabaseCookieRedirect`](/composables/usesupabasecookieredirect) composable directly.
108+
If you want to manually set the redirect path, you can do so by disabling [`saveRedirectToCookie`](/getting-started/introduction#redirectoptions), and then set the value using the [`useSupabaseCookieRedirect`](/composables/usesupabasecookieredirect) composable directly.
107109
::

docs/content/1.getting-started/3.demo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ description: Demonstration of using Supabase with Nuxt.
55

66
Demonstration of using Supabase with Nuxt.
77

8-
[![Supabase demo with Nuxt 3](/demo.png)](https://supabase-demo-gamma.vercel.app)
8+
![Demo supabase x nuxt](/demo.png){.rounded-lg}
99

1010
## Live demo
1111

12-
You can play with the demo on [https://supabase-demo-gamma.vercel.app](https://supabase-demo-gamma.vercel.app)
12+
You can play with the demo on <https://supabase-demo-gamma.vercel.app>
1313

1414
## Running locally
1515

docs/content/2.composables/useSupabaseCookieRedirect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ const currentPath = redirectInfo.path.value
4949

5050
// Get the path and clear it
5151
const path = redirectInfo.pluck()
52-
```
52+
```
5353

5454
The cookie is saved with the name `{cookiePrefix}-redirect-path` where `cookiePrefix` is defined in the [runtime config](/getting-started/introduction#runtime-config).

docs/content/2.composables/useSupabaseSession.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: useSupabaseSession
3-
description: Auto import and use your Supabase user's session with the useSupabaseSession composable
3+
description: Auto import and use your Supabase user's session with the
4+
useSupabaseSession composable
45
---
56

67
Once logged in, you can [auto-import](https://nuxt.com/docs/guide/directory-structure/composables) your user's session everywhere inside your vue files.
@@ -12,7 +13,7 @@ const session = useSupabaseSession()
1213
```
1314

1415
::tip
15-
If you just need the User's information you can use [useSupabaseUser](/composables/usesupabaseuser) which returns just the User information of the session.
16+
If you just need the User's information you can use [useSupabaseUser](/composables/usesupabaseuser) which returns just the User information of the session.
1617
::
1718

1819
## Auth middleware

docs/content/3.services/1.serverSupabaseClient.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: serverSupabaseClient
3-
description: Make requests to the Supabase API on server side with the serverSupabaseClient service
3+
description: Make requests to the Supabase API on server side with the
4+
serverSupabaseClient service
45
---
56

67
::warning
@@ -9,7 +10,7 @@ This section assumes you're familiar with [Nitro](https://v3.nuxtjs.org/guide/co
910

1011
This function is working similary as the [useSupabaseClient](/composables/usesupabaseclient) composable but is designed to be used in [server routes](https://nuxt.com/docs/guide/directory-structure/server#server-routes).
1112

12-
Define your server route and just import the `serverSupabaseClient` from `#supabase/server`. Be careful, `serverSupabaseClient` is returning a promise.
13+
Define your server route and just import the `serverSupabaseClient` from `#supabase/server`. Be careful, `serverSupabaseClient` is returning a promise.
1314

1415
```ts [server/api/libraries.ts]
1516
import { serverSupabaseClient } from '#supabase/server'

docs/content/3.services/2.serverSupabaseServiceRole.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: serverSupabaseServiceRole
3-
description: Make requests with super admin rights to the Supabase API with the serverSupabaseServiceRole service
3+
description: Make requests with super admin rights to the Supabase API with the
4+
serverSupabaseServiceRole service
45
navigation:
56
title: serverSupabaseServiceRole
67
---

docs/content/3.services/3.serverSupabaseSession.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: serverSupabaseSession
3-
description: Get your Supabase user's session from serverside with the serverSupabaseUser service
3+
description: Get your Supabase user's session from serverside with the
4+
serverSupabaseUser service
45
---
56

67
::warning
@@ -10,7 +11,7 @@ This section assumes you're familiar with [Nitro](https://v3.nuxtjs.org/guide/co
1011
This function is similar to the [useSupabaseSession](/composables/usesupabasesession) composable but is used in [server routes](https://nuxt.com/docs/guide/directory-structure/server#server-routes).
1112

1213
::warning
13-
Be advised that `serverSupabaseSession` is considered unsafe, since the session comes from the client and users can tamper with it. For checking if the user is logged in, always use [serverSupabaseUser](/services/serversupabaseuser)
14+
Be advised that `serverSupabaseSession` is considered unsafe, since the session comes from the client and users can tamper with it. For checking if the user is logged in, always use [serverSupabaseUser](/services/serversupabaseuser)
1415
::
1516

1617
Define your server route and import the `serverSupabaseSession` from `#supabase/server`.

docs/content/index.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
---
22
seo:
33
title: Nuxt Supabase - Home
4-
description: A supa simple wrapper around supabase-js to enable usage and integration within Nuxt.
4+
description: A supa simple wrapper around supabase-js to enable usage and
5+
integration within Nuxt.
56
---
67

78
::u-page-hero
89
---
910
orientation: horizontal
1011
---
11-
:::prose-pre
12-
---
13-
filename: pages/login.vue
14-
---
12+
:::prose-pre{filename="pages/login.vue"}
1513
```vue
1614
<script setup lang="ts">
1715
const supabase = useSupabaseClient()
1816
const email = ref('')
19-
17+
2018
async function signInWithOtp() {
2119
await supabase.auth.signInWithOtp({
2220
email: email.value
2321
})
2422
}
2523
</script>
26-
24+
2725
<template>
2826
<input
2927
type="email"

docs/public/demo.png

196 KB
Loading

0 commit comments

Comments
 (0)