wix-members-backend Authentication not returning loginEmail on members object

Hi, when I run use wix-members to call the authentication.register() function, the Promise member object includes loginEmail :

import { authentication } from 'wix-members';

let emails = [];

let options = {
	contactInfo: {
      	emails: [emails],
	},
	privacyStatus: 'PUBLIC'
}
authentication.register(email, password, options)
.then((registrationResult) => {
	return registrationResult;
})
	.catch((error) => {
		console.error(error);
})

// registratioResult.member.loginEmail ✅

But when I run the same function from wix-members-backend, the member object does not include loginEmail:

import { authentication } from 'wix-members-backend';

let emails = [];

let options = {
	contactInfo: {
      	emails: [emails],
	},
	privacyStatus: 'PUBLIC'
}
authentication.register(email, password, options)
.then((registrationResult) => {
	return registrationResult;
})
	.catch((error) => {
		console.error(error);
})

// registratioResult.member.loginEmail ❌

The docs say both API’s should return loginEmail on the members object.

Any ideas?

Thanks

Just did a little test…

import { authentication } from 'wix-members';

$w.onReady(()=>{
    let email = "xxx@yyy.com"
    let password = "12345"

    let options = {
        contactInfo: {
            firstName: "Javier",
            lastName: 'Doe'
        },
        privacyStatus: 'PUBLIC'
    }

    $w('#button1').onClick(()=>{
        authentication.register(email, password, options)
        .then((registrationResult) => {
            console.log("registrationResult: ", registrationResult);
            return registrationResult;
        })
        .catch((error) => {
            console.error(error);
        });
    }); 
});

RESULT:…

Seems like you are right. No login-email inside of results during registration on BACKEND…

I created a test env as well. I’m wondering if it has to do with member.activityStatus & member.status returning UNKNOWN on backend, instead of ACTIVE like on the front.

Either way, I appreciate the confirmation on your side. I’ll use wix-members for now.

1 Like

This one is still some kind of open.
Maybe someone can shed some light on it?

@J.D. any idea?

Wrong API-Description, or is something missing inside code?

1 Like