Account Linking problem
-
Hi,
I have problem with account linking for some time.
It started around 2018-11-09, so 3.8.0 release might be the case.
It affects new registered users (but only some of them).
I suspect it has something to do with verified_email value.In my workflow user registers to wp with a custom form. Then admin verifies this new account and approves it or deletes it from wp. In that period – when user is not yet verified by admin – user can’t login to wp.
I pass that verification status as email_verified value in custom database’s scripts, in callback, along with id, name, nickname and email values.
Now, to the clue: if a user tries to log in to his account, before it is approved by the admin, an Auth0 account is created with ‘pending’ email status, but that account is not linked to that one in wp.
Then even if that status is changed in wp, and passed as email_verified with true value, the wordpress account remains unlinked and for that unlinked account in Auth0 the email status remains as ‘pending’.
I have to delete that unlinked account from Auth0 and the next time the user logs to wp with email_verified status set to true, the linking works right.What can I do to link accounts with email_verified state set to false or to prevent adding such accounts to auth0?
I found that there is a rule Account-Linking-Do-Not-Rename-NAME
I tried to comment those lines
// Check if email is verified, we shouldn't automatically // merge accounts if this is not the case. if (!user.email_verified) { return callback(null, user, context); }or even to additionaly remove the if-statement checking,
if (targetUser.email_verified)but the result is still the same.
The topic ‘Account Linking problem’ is closed to new replies.