TARS
TARS
Explore posts from servers
KKinde
Created by TARS on 2/6/2024 in #💻┃support
Can't get the user info from const { getUser } = getKindeServerSession();
I must be totally braindead but I'm just trying to get the information about the user in this way. Using next.js. import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";
```
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";

const Page = () => {
const { getUser } = getKindeServerSession();
const user = getUser();

return (
<MpWrapper className="mt-32">
<h1>Dashboard</h1>
<p>User: {user.email}</p>
</MpWrapper>
);
};
```
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";

const Page = () => {
const { getUser } = getKindeServerSession();
const user = getUser();

return (
<MpWrapper className="mt-32">
<h1>Dashboard</h1>
<p>User: {user.email}</p>
</MpWrapper>
);
};
Property 'email' does not exist on type 'Promise<KindeUser | null>'. Isn't it supposed to be an object? I'm logged in and everthing. I'm every writing exactly as Josh tried coding does
27 replies