Say, I have been having some issues with the new authentication.register API that I can’t figure out. Additionally, I have a question about getMember that I need help with.
Each of these issues seem like they are likely small things that I am simply too frustrated now to see.
FIRST: register():
two problems:
1 - UNIDENTIFIED TYPE ERROR: I am getting an error upon registration that I cannot chase down. Upon calling register(), it is falling to the .catch logic with the following error message: “TypeError: e is undefined”
However, the registration still works! (user is added to Contact list and as a pending Member waiting for manual approval.)
Code example:
/* FRONTEND */
/* BACKEND */
There is nothing suspicious about the registerInfo Object.
All data looks correct. There is nothing that is clear to me on where to find the culprit. Any suggestions are greatly appreciated.
2 - UNABLE TO SAVE MEMBER DATA
As seen above, I am trying to add the customer address and a custom field via code to the member data but am unsuccessful. All other fields are correctly recorded.
While the documentation for the register parameters do not include address data, I find it very hard to believe they are actually omitted. I have constructed the object above based on what i get back from the getMember API. but have had no luck. I find no examples anywhere of anyone actually trying to add an address in the contactInfo…
As for the custom field, I am not sure what the issue is, but I am unable to save it. I have tried it as shown above as well as removing the “customField” object and just added the MemberCode to the customerInfo object directly. Neither works. No Wix examples show using “customField”: { “key”/“value”} nomenclature even though it is in the documentation.
What am I missing here?
3 - FINALLY: currentMember.getMember
As mentioned above, I have created a custom field “MemberCode”. It is included in both the contact list and site members data. I have manually added a code to several users as an example and YET, when I call getMember (where options = fieldsets: [ ‘FULL’ ]). I still end up with:
“customFields”:{}
I would appreciate it if someone can help me out.
Thanks
-steve