https://supertokens.com/ logo
Title
y

YadedYash

01/03/2023, 4:17 PM
There is a overload error here, if i remove the Express.response. If I remove the Express.response type, typescript fails to compile
r

rp

01/03/2023, 4:43 PM
hey @YadedYash
y

YadedYash

01/03/2023, 4:44 PM
Good morning my friend how you doing?
r

rp

01/03/2023, 4:44 PM
im doing well. Thanks! How are you?
y

YadedYash

01/03/2023, 4:44 PM
Iโ€™m great! Just banging my head against the wall lol
r

rp

01/03/2023, 4:44 PM
You need to use the
req: SessionRequest, res: Express.Response
to get the correct typing.
when you do
req.session!.getUserId()
what do you get back?
y

YadedYash

01/03/2023, 4:45 PM
Give me one moment, will get right back to you
Console spits out nothing bro
r

rp

01/03/2023, 4:52 PM
can i see some code?
Can you do the console long after calling getUserId?
y

YadedYash

01/03/2023, 4:55 PM
as in immediatley after line 110?
same exact log?
r

rp

01/03/2023, 4:55 PM
Yes
Did you call the api?
y

YadedYash

01/03/2023, 4:57 PM
as in like fetching the endpoint? no
sorry im self taught
I am very much teaching myself as i go
r

rp

01/03/2023, 4:58 PM
I see. Not sure if this is the right place for this then. Sorry.
y

YadedYash

01/03/2023, 4:59 PM
Is there any documentation you would recommend I read for this
r

rp

01/03/2023, 4:59 PM
Not specifically. Our docs are quite extensive already.
y

YadedYash

01/03/2023, 5:00 PM
Got it, when I call the get api in postman it gives me a message: unauthorized object
If that helps at all
otherwise I do not know what exactly I am doing wrong
r

rp

01/03/2023, 5:00 PM
Yup. It means you need to first login.
y

YadedYash

01/03/2023, 5:00 PM
Strange, since I am logged in.
like i said earlier, if i follow the docs and use the getUserByEmail method everything works fine
the issue for me is im not sure how to get user email from the session dynamically in the backend
r

rp

01/03/2023, 5:02 PM
Did you call the login api via postman first?
y

YadedYash

01/03/2023, 5:03 PM
I did. Whats strange is that when i run my environment I am very clearly logged in, and i can display the correct UserID in my frontend which I match with the userID in the dashboard, this is following the react docs
r

rp

01/03/2023, 5:04 PM
Consider enabling backend debug logs and then calling the api from postman. It might give you a hint on whatโ€™s wrong
y

YadedYash

01/03/2023, 5:05 PM
Thanks, will try that. Enjoy the rest of your day. I had a call set up for 10:30 pm pacific tonight, shall i cancel that if this is not really the place for one man project questions?
r

rp

01/03/2023, 5:05 PM
Yes please ๐Ÿ™‚
y

YadedYash

01/03/2023, 5:07 PM
Got it. Thanks for your time, again I apologize if I wasted your time or this was not the appropriate forum, I am not new to development anymore but this is very much my first fully featured client project. Thanks again.
r

rp

01/03/2023, 5:08 PM
Happy to help ๐Ÿ™‚ Good luck.