Karamazov89
BABetter Auth
•Created by A Microcosm of the Macrocosm on 4/13/2025 in #help
Custom Tables | SQL Schema
Also interested in answers to the above questions - in particular, why can't we use
uuid
for PK fields6 replies
BABetter Auth
•Created by Karamazov89 on 2/6/2025 in #help
Browser back button after signing out lets you get inside private route
It is his own server action
14 replies
BABetter Auth
•Created by Karamazov89 on 2/6/2025 in #help
Browser back button after signing out lets you get inside private route
Thanks for the suggestions though, much appreciated!
14 replies
BABetter Auth
•Created by Karamazov89 on 2/6/2025 in #help
Browser back button after signing out lets you get inside private route
Finally decided to router.refresh to ensure client cache is cleared. It's a shame we can't router.push and clear cache in a single stroke. Got confused by this example https://www.better-auth.com/docs/basic-usage#signout since it suggests router.push
14 replies
BABetter Auth
•Created by Karamazov89 on 2/6/2025 in #help
Browser back button after signing out lets you get inside private route
Ah yes good point, indeed a caching issue. I'm on nextjs and trying to clear the cache after signing out. But revalidatePath("/", "layout") inside an after hook doesn't seem to do the trick.
I want to avoid redirecting and then clearing cache:
router.push(HOME_HREF)
router.refresh()
14 replies
BABetter Auth
•Created by Karamazov89 on 2/5/2025 in #help
Cannot delete user when sessions are in secondary storage instead of database
2025-02-05T15:58:04.295Z ERROR [Better Auth]: BetterAuthError [Error [BetterAuthError]: [# Drizzle Adapter]: The model "session" was not found in the schema object. Please pass the schema directly to the adapter options.] {
cause: undefined
}
9 replies
BABetter Auth
•Created by Karamazov89 on 2/5/2025 in #help
Session is always null inside a "before hook"
That works, thanks
3 replies