# Login with Patreon Not Working?

**URL:** <https://www.patreondevelopers.com/t/login-with-patreon-not-working/115>\
**Category:** Friendly Help\
**Created:** [November 19, 2017, 12:04am UTC](https://www.patreondevelopers.com/t/login-with-patreon-not-working/115 "2017-11-19T00:04:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveenmarikar123](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@naveenmarikar123](https://www.patreondevelopers.com/u/naveenmarikar123)\
**Post date:** [November 19, 2017, 12:04am UTC](https://www.patreondevelopers.com/t/login-with-patreon-not-working/115/1 "2017-11-19T00:04:22Z")

</div>

Hi all ,

I’m currently trying to integrate Patreon with my Wordpress website , so the issue is that my Wordpress website is currently running on localhost. I have already installed the patreon-wordpress plugin.

And when I try to login via Patreon , I get the screen -

 ![28 AM](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/1X/2955a598850d1d6a7906a0d1f21b11aaf95b85c4.png)

And after I click “Allow” , nothing happens , the Patreon\_Login methods are not getting executed. I think this issue is due to the redirect uri being localhost. Is it so ?

Thanks,  
Naveen

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [November 19, 2017, 3:39pm UTC](https://www.patreondevelopers.com/t/login-with-patreon-not-working/115/2 "2017-11-19T15:39:38Z")

</div>

It may be due to this:

It seems Patreon API is not returning the var ‘patreon-oauth’ in its return anymore.

In existing Patreon WordPress packages, in patreon\_routing.php class, there is a check for it:

```
	if (array_key_exists( 'patreon-oauth', $wp->query_vars )) {

		if(array_key_exists( 'code', $wp->query_vars )) {

```

Since patreon-oauth is not being returned, this would fail all the time, leading the login to fail.

But if you combine these conditionals to a single one like the below…

```
	if (strpos($_SERVER['REQUEST_URI'],'/patreon-authorization/')!==false) {

```

…then the login would be checked when it lands at redirect url, and it would work. I just check for existence of the particular slug in the request, but you can do the check however you want.

I am using this in my sites and it works so far.

But i reckon there may be new changes in the API soon, so we may need to revisit this code.

---

<div class="post-metadata">

**Author:** ![naveenmarikar123](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@naveenmarikar123](https://www.patreondevelopers.com/u/naveenmarikar123)\
**Post date:** [November 19, 2017, 10:55pm UTC](https://www.patreondevelopers.com/t/login-with-patreon-not-working/115/3 "2017-11-19T22:55:54Z")

</div>

Thank you so much . It works now ! 🙂
