trite
trite
BABetter Auth
Created by trite on 4/9/2025 in #help
Determine if new user without callbacks in expo
When using authClient.signin.social in an expo app the deep link callbacks don't currently work, sounds like it should be fixed in an upcoming version. In the meantime I'm using the workaround that is in the example expo project to force a redirect after authenticating:
useEffect(() => {
if (isAuthenticated) {
if (navContainerRef.isReady()) {
router.push("/root");
}
}
}, [isAuthenticated, navContainerRef.isReady()]);
useEffect(() => {
if (isAuthenticated) {
if (navContainerRef.isReady()) {
router.push("/root");
}
}
}, [isAuthenticated, navContainerRef.isReady()]);
Until the new user callback is an option, is there an easy way to handle dealing with new users? I'm trying to avoid adding fields to the db just for this purpose (ex: newAccountSetupCompletedAt which defaults to null), but it's seeming like the most reasonable approach right now. Are there any better options?
9 replies