niifler
niifler
BABetter Auth
Created by niifler on 3/23/2025 in #help
is there any way to handle current session across all the app once
i want to display the current user in the home page but also check if the session exist to make a post request so ineed to get the session again in that component is there any way to handle session in a single compoenent or a single server function in next js
2 replies
BABetter Auth
Created by niifler on 3/19/2025 in #help
cant find table column that i added to the user table in session
so basiclly i modified the user table and added a phone field but when i try to display it using the session hook useSession i get an erreur that the property does not exist on type user i added the additionalFields in the auth.ts file and i can successfully signUp and the phone gets added to the user table
<div className="flex flex-col space-y-0.5">
<p className="text-sm font-medium">
{session.user?.name || "User"}
</p>
<p className="text-xs text-muted-foreground truncate">
{session.user?.email || ""}
</p>
<p className="text-xs text-muted-foreground truncate">
{session.user?.phone || ""}
</p>
</div>
<div className="flex flex-col space-y-0.5">
<p className="text-sm font-medium">
{session.user?.name || "User"}
</p>
<p className="text-xs text-muted-foreground truncate">
{session.user?.email || ""}
</p>
<p className="text-xs text-muted-foreground truncate">
{session.user?.phone || ""}
</p>
</div>
11 replies