You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/1.getting-started/1.introduction.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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."
4
4
---
5
5
6
6
[@nuxtjs/supabase](https://github.com/nuxt-modules/supabase) is a Nuxt module for first class integration with Supabase.
@@ -75,14 +75,14 @@ Default: `true`
75
75
76
76
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.
77
77
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.
79
79
80
80
::warning
81
81
When `useSsrCookies` is `true` the following options cannot be customized with `clientOptions`:
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.
86
86
::
87
87
88
88
### `redirect`
@@ -109,7 +109,7 @@ Default:
109
109
- `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->URLConfiguration->RedirectURLs`.
110
110
- `include`: Routes to include in the redirect. `['/admin(/*)?']` will enable the redirect only for the `admin` page and all sub-pages.
111
111
- `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.
113
113
114
114
### `cookiePrefix`
115
115
@@ -198,8 +198,8 @@ Use the `cookieRedirect` option to store the redirect path in a cookie.
198
198
199
199
## Demo
200
200
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).
202
202
203
-
[](https://supabase-demo-gamma.vercel.app)
203
+
{.rounded-lg}
204
204
205
205
Also checkout the [YouTube video](https://www.youtube.com/watch?v=jIyiRT6zT8Q) about its usage in a live demo.
Copy file name to clipboardExpand all lines: docs/content/1.getting-started/2.authentication.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
---
2
2
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
4
6
---
5
7
6
8
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, () => {
103
105
```
104
106
105
107
::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.
The cookie is saved with the name `{cookiePrefix}-redirect-path` where `cookiePrefix` is defined in the [runtime config](/getting-started/introduction#runtime-config).
Copy file name to clipboardExpand all lines: docs/content/2.composables/useSupabaseSession.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
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
4
5
---
5
6
6
7
Once logged in, you can [auto-import](https://nuxt.com/docs/guide/directory-structure/composables) your user's session everywhere inside your vue files.
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.
Copy file name to clipboardExpand all lines: docs/content/3.services/1.serverSupabaseClient.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
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
4
5
---
5
6
6
7
::warning
@@ -9,7 +10,7 @@ This section assumes you're familiar with [Nitro](https://v3.nuxtjs.org/guide/co
9
10
10
11
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).
11
12
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.
Copy file name to clipboardExpand all lines: docs/content/3.services/3.serverSupabaseSession.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
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
4
5
---
5
6
6
7
::warning
@@ -10,7 +11,7 @@ This section assumes you're familiar with [Nitro](https://v3.nuxtjs.org/guide/co
10
11
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).
11
12
12
13
::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)
14
15
::
15
16
16
17
Define your server route and import the `serverSupabaseSession` from `#supabase/server`.
0 commit comments