It seems that if you “Log in with Patreon” for the first time, using a Patreon account that “already” exists in the Wordpress installation, it is “supposed” to display an error asking you to log in with wordpress first.
What actually happens is nothing.
You go to the oauth screen, you authorise the connection between patreon and the wordpress install, and then get sent back to the login page (without being logged in).
I say “supposed”, because there is a query string added to the URI when being redirected back from the oauth permissions screen “?patreon_message=email_exists_login_with_wp_first”, and looking at the source of the login page, the plugin defines the css styles for a “.patreon-msg” class. That suggests that there were plans to show this error to the user.
However, there doesn’t seem to be a html element on the login page that actually applies the class, so this error message doesn’t show up.
In addition, even if I “was” to see that error message and know to log in with my pre-existing wordpress account instead, there doesn’t seem to be a very good UX for linking the accounts together in order for my pre-existing account to be given the patreon permission.
We don’t give the average user access to the back-end, but even if we did, there’s no “link patreon” option in the edit user profile.
There’s also no “link patreon” option on the “my account” page that WooCommerce adds (an ideal location in my opinion).
It would appear that the only way - that I can find - to link the accounts, is to return to “wp-login.php” after having already logged in with the wordpress account, and using the login with patreon button.
This “does” link the accounts together, but it’s a unrealistic process for a user to follow, as once logged in, they don’t tend to have an obvious route back to wp-login.php.
An existing user would need to note the query string added to the URL when getting the silent error, and then know enough about wordpress to make their way back manually to the login page after logging in.
I think there really needs to be a couple of quick fixes.
- Add the HTML elements required to the login form in order for an existing user to actually “see” an error message about the existing email when they attempt to log in with patreon.
- Add a custom page (preferably with an integration that sets the page as a tab on the WooCommerce MyAccount page) that provides users with either the “Log in with Patreon” button (if they are not linked), or a summary of their current permission status (if they have linked).
On a side note.
Looking at the usermeta data added when linking a wordpress user to patreon, it might be a bit safer to change the “user_firstname” to “patreon_user_firstname” and change “user_lastname” to “patreon_user_lastname”.
All the other meta information seems to have a patreon_ prefix, and it’s generally (IMO) safer to make sure that you use a consistent meta value naming scheme to prevent other plugins accidentally breaking things.