Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: show async allowed for storage in sessions.mdx (#19855)

Jonathan Stanley23b9d97ba504
diff --git a/apps/docs/pages/guides/auth/sessions.mdx b/apps/docs/pages/guides/auth/sessions.mdx
index a14472276e3..fd06b0f2044 100644
--- a/apps/docs/pages/guides/auth/sessions.mdx
+++ b/apps/docs/pages/guides/auth/sessions.mdx
@@ -156,7 +156,7 @@ const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
})
```
-The `customStorageObject` should implement the [`localStorage` interface](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage).
+The `customStorageObject` should implement the `getItem`, `setItem`, and `removeItem` methods from the [`Storage` interface](https://developer.mozilla.org/en-US/docs/Web/API/Storage). Async versions of these methods are also supported.
When using cookies to store access and refresh tokens, make sure that the [`Expires` or `Max-Age` attributes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes) of the cookies is set to a timestamp very far into the future. Browsers will clear the cookies, but the session will remain active in Supabase Auth. Therefore it's best to let Supabase Auth control the validity of these tokens and instruct the browser to always store the cookies indefinitely.