https://supertokens.com/ logo
Title
t

tonyb

12/21/2022, 8:19 AM
hi any ideas how to resolve typescript errors here?
n

nkshah2

12/21/2022, 8:19 AM
Hi
Yeah sadly theres no fix for this
t

tonyb

12/21/2022, 8:20 AM
it is looking for a type of SessionRequest
n

nkshah2

12/21/2022, 8:20 AM
For now we recommend casting it as any, a fix for this in the pipeline but theres no timeline for that yet
t

tonyb

12/21/2022, 8:28 AM
FWIW:
works fine here
n

nkshah2

12/21/2022, 8:29 AM
Ah right, yeah that works
t

tonyb

12/21/2022, 8:29 AM
even says req has a session ->
n

nkshah2

12/21/2022, 8:30 AM
Cool, glad you figured it out
t

tonyb

12/21/2022, 8:41 AM
hi @nkshah2 I couldn't find doc for reading user email from session
n

nkshah2

12/21/2022, 8:41 AM
Is this for the frontend or backend?
t

tonyb

12/21/2022, 8:42 AM
for api backend
n

nkshah2

12/21/2022, 8:42 AM
Right so from the session you would get the user id, and then use that to get the email What auth recipe are you using?
t

tonyb

12/21/2022, 8:43 AM
passwordless email
n

nkshah2

12/21/2022, 8:44 AM
You can use
Passwordless.getUserById
Which will give you the full user object including the email
t

tonyb

12/21/2022, 8:45 AM
nice works 👍
n

nkshah2

12/21/2022, 8:46 AM
Happy to help