User login issue

A user logs in to my site.
Thereafter, I fire the wixUsers.currentUser.getEmail() API.
It should return the email of the user wrapped in a Promise.
However, the promise gets rejected.
I know for a fact that the user is logged in, yet I’m unable to get their email via API.
Has anyone faced this issue before?
Help, please.

It’s hard to tell when you don’t see the whole picture. I assume it can be caused by login/sign up system or because you are previewing the site (The APIs in wix-users are only partially functional when previewing your site) or you are using your code before the page is loaded.
You can open a ticket so we can take a further look at it and see if you have any obvious errors that we can spot:
https://support.wix.com/en/article/contacting-wix-support