getEmail() returning empty object

This is what you will need at the back-end:

BACK-END:

import wixUsersBackend from 'wix-users-backend';

export function get_userData(){
   let userEmail
   let user = wixUsersBackend.currentUser;
   let userId = user.id; 
   let isLoggedIn = user.loggedIn; 
   return user.getEmail()
   .then(async (email) => {
      userEmail = await email;
      return({"ID": userId, "email": userEmail, "state":isLoggedIn})
   });
}

And this one goes to FRONT-END:

import {get_userData} from 'backend/data.jsw'

$w.onReady(async function() { 
    let userData = await get_userData(); console.log("User-Data: ", userData);
}

Good luck!:wink: