Login via patreon not working

Hi, when I try to use the login via patreon button to get into my wordpress site it throws this error

{“error”:“invalid_request”,“error_description”:“Mismatching redirect URI.”,“state”:“eyJmaW5hbF9yZWRpcmVjdF91cmkiOiJodHRwczpcL1wvd3d3LnN0aWpudmFuZGVuaG92ZW4uY29tIn0=”}

Thanks

Here are my api settings I filled in.

I used for redirect uri this:

https://www.patreon.com/oauth2/authorize?response_type=code&client_id=123&redirect_uri=https://www.stijnvandenhoven.com/custom-uri&state=their_session_id

Is there an example of what to fill in on the API as I suspect thats where my error is. Besides the redirect URI I also battled what to fill in for privacy policy url and terms of service url. Thanks for your help to get it working. Its only the login via patreon to my wordpress thats not working I think. I can lock posts with patreon pledge afaik,

Redirect uri setting at Patreon is supposed to be copied from the redirect uri setting which shows at your site in Patreon plugin settings.

Simply c/p the setting there to Patreon, update client, and retry.

1 Like

Cool, That did that got me 1 step further.

It now lands me here.

When I click accept ity bounces me back to the main page.

Is there maybe a delay in waiting for the api to start working after update? If this is fixed will the patreon unlock post also work as someone got this error there after trying to unlock post, I suspect all related.

Please copy and paste the exact redirect uri settings which you see in the settings page of your plugin and the redirect uri setting at Patreon client here, separately. Lets see if there is any minor discrepancy due to protocol etc.

I recreated api from scratch. It still doesnt work. It throws me back to the main login page with this URL:

https://www.stijnvandenhoven.com/wp/wp-login.php?patreon_message=email_exists_login_with_wp_first

I tried login in to wordpress.com see if that made a difference. it didnt. It just doesnt allow me to log in via Patreon.

OK, I created a second patreon regular account (and not a creator account) with a different email adress to my wordpress account (I suspected that might conflict was not sure)

Now it does work and does not throw the string error. (only when I am logged in as my creator account on patreon it throws the error)

The “login as patreon button” on the wp/admin login logs me now in to the site as a patreon “SUBSCRIBER” using my second account (it doesnt let me choose which account to log in with) I still dont know why I could not log in with my creator account. It created a subscriber account and unlocks the post on the right pledge amount and keeps the higher pledges locked.

As the SUBSCRIBER account created a user to my site it gave a default admin bar on top of my site to that user (which I had to use a plugin for to disable that for subscribers) this was annoying. Disabling the bar then gave me no method anymore to log of the subscriber unless I went to wp/admin url and so got the bar manualy.

The sign up for patreon widget buttons are still on my site as a subscriber. (it would be cool if it was detected that a patreon subscriber logged in and then this removed the sign up widgest)

Suggested improvements:

  1. The trick is now to create a login button for existing patreon users on the website (and not on the wp/admin backend as useless there. A “Patreon log on button” With a hidden admin bar It should give a link to the admin pannel or even better a “patreon log of button”

  2. The patreon plugin should be able to toggle off the admin bar for subscribers completely without the use of another plugin to do that.

  3. It should detect if a patreon user is logged in and then thus remove the widgets to get people to sign up for patreon or give another special “pledge more” option for existing logged in subscribers.

Hoping for your feedback.

That’s not technically possible. You cant be the creator and also subscriber in the same Patreon account. Plugin cant query that from the api. Hence, you must use one or the other while testing your site.

#1 - The login button in WP login screen may have an issue with logging in for non patrons. I will look into that

#2 - That we cannot do - we cannot modify default behavior of a WP website. Anyone who wants to do that can install a plugin to disable admin bar for subscribers - there are numerous such plugins.

#3 - The widgets come from Patron Button and Widgets plugin by Codebard - its another plugin. I may look into making it disable if it detects the logged in patron. But when used with Patron Pro, it should already disable the post buttons which ask visitors to pledge.

Thank you,

I hope my thread was usefull for possible further debugging and fixing these issues I encountered. Good for looking at

#1, it should redirect to a splash page telling you cant login using the creator account instead code string.

#2 But patreon is allready a plugin, cant this functionality be added instead of installing an extra plugin?

#3 I will buy the pro version, I want to support your efforts and see if that solves disabling the post buttons. (but you said its a different plugin?) not sure what you mean here.

#4 As for a front end logon to patreon and log of from patreon button can that be incorporated, or information provided how to place such buttons on the front end to avoid using the admin panel bar altogether and provide users on the front end to logon with patreon and log of with patreon to a site. That usability would be needed for good user interaction with your plugin.

BTW I tried to purchase the pro plugin but service is down

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Sorry about that. Yesterday there were infrastructure upgrades at Codebard site. Its now set up at its new location so it should be fast and available. You can just try again and it should go through this time.

Thank you

I now bought the plugin (Thanks) but now it throws this error:

Warning: Invalid argument supplied for foreach() in /home/stijnvan/public_html/wp/wp-content/plugins/patreon-connect/classes/patreon_frontend.php on line 317

I googled and it also does that on this blog. (live example)

https://magebit.me/walking-blindly-through-history

but my site is www.stijnvandenhoven.com

Click on the sanchi culture link it was patreon locked

https://www.stijnvandenhoven.com/2019/06/04/sanchi-culture/

sorry to bother you for this

Try just visiting your post-editor page and view a random post’s edit page. This should update your tiers from Patreon and remove the warning.

Warnings should not be set to on in production servers in any case.