authClient.getSession wrong return type

when using authClient with
fetchOptions: {
    throw: true
  }


the return type is:
{
    user: { ... 11 more };
    session: { ... 9 more };
}


but it should be:
{
    user: { ... 11 more };
    session: { ... 9 more };
} | null
Solution
GitHub
When there isn't an active session, null is returned on the /get-session endpoint. This was missing in types.
Was this page helpful?