Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
How to update `api/auth/get-session` with new session data? - Better Auth
BA
Better Auth
•
11mo ago
•
32 replies
generator101
How to update `api/auth/get-session` with new session data?
I am updating the users table with the new name but accessing
api/auth/get-session
api/auth/get-session
gives the old data
. Is there a way to trigger an update when the database is updated so session data is also updated
?
I am using tanstack start
.
`
`
`import
{ createAPIFileRoute
} from
'
@tanstack
/react
-start
/api
'
import
{ auth
} from
'
@
/lib
/auth
'
export const APIRoute
= createAPIFileRoute
(
'
/api
/auth
/
$
'
)
(
{
GET
:
(
{ request
}
)
=
> auth
.handler
(request
)
,
POST
:
(
{ request
}
)
=
> auth
.handler
(request
)
,
}
)
Better Auth
Join
9,988
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
GET /api/auth/get-session
BA
Better Auth / help
9mo ago
/api/auth/get-session => 404
BA
Better Auth / help
5mo ago
Custom Session running twice on GET /api/auth/get-session
BA
Better Auth / help
11mo ago
/api/auth/get-session 404 Not Found
BA
Better Auth / help
12mo ago