authClient.getSession wrong return type

when using authClient with
fetchOptions: {
throw: true
}
fetchOptions: {
throw: true
}
the return type is:
{
user: { ... 11 more };
session: { ... 9 more };
}
{
user: { ... 11 more };
session: { ... 9 more };
}
but it should be:
{
user: { ... 11 more };
session: { ... 9 more };
} | null
{
user: { ... 11 more };
session: { ... 9 more };
} | null
Solution:
GitHub
fix(get-session): missing null type on /get-session by ping-maxwe...
When there isn't an active session, null is returned on the /get-session endpoint. This was missing in types.
Jump to solution
1 Reply
Solution
Ping
Ping4mo ago
GitHub
fix(get-session): missing null type on /get-session by ping-maxwe...
When there isn't an active session, null is returned on the /get-session endpoint. This was missing in types.

Did you find this page helpful?