newkind
newkind
BABetter Auth
Created by newkind on 4/4/2025 in #help
Slow API response time until sign out & sign in again
ok, thank you very much for your help
11 replies
BABetter Auth
Created by newkind on 4/4/2025 in #help
Slow API response time until sign out & sign in again
yah, this would be the case, so is there anything I could do about this with server auth instance besides extending cookie cache?
11 replies
BABetter Auth
Created by newkind on 4/4/2025 in #help
Slow API response time until sign out & sign in again
Looks like this is the same issue as in this topic, but I don't quite understand the solution: https://discord.com/channels/1288403910284935179/1354487295264165898
11 replies
BABetter Auth
Created by newkind on 4/4/2025 in #help
Slow API response time until sign out & sign in again
@Ping ok, here's what I found out - I have cookieCache enabled in auth.ts with default maxAge. So when you sign in Better-Auth creates 2 cookies - better-auth.session_data and better-auth.session_token and once the cookie better-auth.session_data maxAge expires, it gets deleted and thats what's causing the long response times. So if I keep my dashboard just sit idling past the cookie max age that's where this happens. So now logically it would be that the cookie gets regenerated on the next action/route switch, but this doesn't happen. I have to manually refresh the browser window so that better-auth.session_data cookie gets regenerated.
11 replies
BABetter Auth
Created by newkind on 4/4/2025 in #help
Slow API response time until sign out & sign in again
Thank you for the reply! I'll try with indexes and keep investigating this further.
11 replies