hi any ideas how to resolve typescript errors here...
# support-questions
t
hi any ideas how to resolve typescript errors here?
n
Hi
Yeah sadly theres no fix for this
t
it is looking for a type of SessionRequest
n
For now we recommend casting it as any, a fix for this in the pipeline but theres no timeline for that yet
t
FWIW:
works fine here
n
Ah right, yeah that works
t
even says req has a session ->
n
Cool, glad you figured it out
t
hi @nkshah2 I couldn't find doc for reading user email from session
n
Is this for the frontend or backend?
t
for api backend
n
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
passwordless email
n
You can use
Passwordless.getUserById
Which will give you the full user object including the email
t
nice works 👍
n
Happy to help
2 Views