Skip to content

Commit 79f508a

Browse files
authored
docs(security): advise to serverSupabaseSession (#430)
1 parent 2fbfbfb commit 79f508a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This section assumes you're familiar with [Nitro](https://v3.nuxtjs.org/guide/co
99

1010
This function is similar to the [useSupabaseSession](/usage/composables/usesupabasesession) composable but is used in [server routes](https://nuxt.com/docs/guide/directory-structure/server#server-routes).
1111

12+
::callout{color="amber" icon="i-heroicons-exclamation-triangle-20-solid"}
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](/usage/services/serversupabaseuser)
14+
::
15+
1216
Define your server route and import the `serverSupabaseSession` from `#supabase/server`.
1317

1418
```ts [server/api/session.ts]

0 commit comments

Comments
 (0)