What is the most secure method of automatically creating password for an account on WIX CRM for a user who Authenticates with Google.
i.e. the user info (email, name, etc) is received from Google and then submitted to Wix CRM to create a new member account on the website.
Note when user info is received from Google we receive no password as expected. Wix CRM requires a password be provided to create a new member. How do we create the password securely in this scenario?
See code below that requires a password. I do not have an error message. Im just questioning how to securly create a new member password once i receive the users info from Google Auth.
import wixUsers from ‘wix-users’;
// …
let email = // the user’s email addresses
let password = // the user’s password
Hi Mike,
When using social login there is no need to manage the registration yourself, why do you need the password from google auth?
Anyway, this isn’t possible to get the password if the user registered using google auth.
I do not need a password from google auth. What i receive from google auth is the users email address, name, picture, etc.
As I have mentioned previously Wix CRM requires a password be provided to create a new member.
receive user info from google auth = complete
create a member account with WIX CRM using the user info received = not complete, as i’m asking how do we create the password securely in this scenario?
Hi,
I believe you are confusing wix-crm with wix-users: Wix-crm is used to manage the contacts of your site (e.g - send emails to contacts). Wix-users is used to manage the visitors of your site (e.g - manage login, approve members).
If you wish to add a user to your contacts list, you don’t need a password, check out the API I linked above.
Regarding the code you shared, you tried to use wixUsers .register() but if the user registered already with google auth, you shouldn’t register him again.
@Or
I want to register a user they will then be able to log in and use the website.
As you may be aware the default WIX google auth only receives the users email. I need more so I have written some html code that allows the user to authenticate with google.
When they authenticate i not only receive their email, i also receive their first name, last name, profile picture.
I then need to create a new member on my site using the code i posted earlier which requires a password.
I could of course just set a static password i.e. “12345” but this would not be very secure as every single member would have the same password.
How do we create the password securely in this scenario ?
To clarify when the person authenticates with google auth the user does not register, we only receive the user info: email, first name, last name, etc in this step.
Next we then have to register the user based on the info we receive from google. We are only registering the user once.