Ritik
Ritik
BABetter Auth
Created by Ritik on 5/20/2025 in #help
signout doesn’t show logged out right away; I have to reload the page to see it.
When I implement signout and click it, it doesn't immediately show the logged-out display; instead, I have to reload the page to see the change. repo - https://github.com/ritiksharmarj/analytics.ritiksharma.me/blob/main/components/app-header.tsx#L77 better auth dir - https://github.com/ritiksharmarj/analytics.ritiksharma.me/tree/main/lib/auth
"use client";

onclick = {async () => {
await signOut({
fetchOptions: {
onSuccess() {
router.push(ROUTES.ROOT);
}
}
})
}}
"use client";

onclick = {async () => {
await signOut({
fetchOptions: {
onSuccess() {
router.push(ROUTES.ROOT);
}
}
})
}}
But it works fine in dev mode
6 replies