supabase/supabase

Clarify when to use `getClaims` and `getUser` and discourage usage of `getSession`

Open

#40.985 aberto em 30 de out. de 2025

Ver no GitHub
 (50 comments) (1 reaction) (1 assignee)TypeScript (102.348 stars) (12.387 forks)batch import
documentationexternal-issuehelp wantedp1plannedto-triage

Description

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

All of the Server Framework Documentation still uses getUser() by default, which means there is an extraneous call to the database. Supabase created getClaims() for this purpose increasing the speed and security of Supabase Auth.

The docs should reflect this by default.

Outdated Setup

No Server Setup At All

  • Nuxt - this doesn't even have a server endpoint setup and is just a Vue setup
  • SolidJS - There should be a SolidStart version for server

The @supabase/ssr makes it easy to add functionality to any framework, and could easily be used in place of outdated addons like:

I am happy to help create a demo for all of these if necessary (just let me know), but first SvelteKit and NextJS docs need to be updated with getClaims() instead of getUser(), and before getClaims() can be useful, the typing problem should be fixed.

J

Your Suggestion for Changes

No response

Documentation URL

No response

Steps to reproduce

No response

Guia do colaborador