rp_st
12/29/2020, 4:22 AMreq.session.getUserId()
- From the userId, you can get the email via:
let {getUserById} = require("supertokens-node/recipe/emailpassword");
let user = getUserById(userId);
let email = user.email;
If you would like to get the email on the frontend, you should create an API which returns the email from the session, or you can even put the email in the JWT payload when creating a session.