Back to Supabase

Get Session Warning

apps/docs/content/_partials/get_session_warning.mdx

1.26.04529 B
Original Source
<Admonition type="danger">

Note that auth.getSession reads the auth token and the unencoded session data from the local storage medium. It doesn't send a request back to the Supabase Auth server unless the local session is expired.

You should never trust the unencoded session data if you're writing server code, since it could be tampered with by the sender. If you need verified, trustworthy user data, call auth.getUser instead, which always makes a request to the Auth server to fetch trusted data.

</Admonition>