mautic / mautic-joomla

Joomla Plugin
16 stars 16 forks source link

Unable to authorise if htaccess is in place to protect administrator panel #18

Closed RCheesley closed 6 years ago

RCheesley commented 9 years ago

It doesn't seem possible to authorise the plugin if htaccess is being used to block access to the admin panel?

escopecz commented 9 years ago

Quick fix could be to turn off the htaccess protection, authorize the plugin and then turn the protection back on. Could you try that?

Long story

I tried to modify the plugin so the callback will be to front end of Joomla instead of back end since I think that would solve this issue. For long time the authorization was failing on this line:

https://github.com/mautic/mautic-joomla/blob/master/mautic.php#L255

So clearly the access tokens were not valid. I checked it many times, cleared prod cache of Mautic to be sure that's not it. Nothing helped. I also noticed that Joomla messages were not displaying so I wanted to fix that and that's how I discovered that Joomla uses different cache for back end and front end. Mautic API library stores information to the front end session and then it cannot access it at the back end.

I'm out of ideas how to deal with the 2-session problem. Any ideas?

RCheesley commented 9 years ago

Yeah, I gave up in the end as the only way I could see it working was to turn off the htaccess and I didn't have access to do that. Not sure how to proceed!

Ruth

Ruth Cheesley CEO & Co-Founder

Virya Group Limited

P: +44 (0) 1473 852130 E: ruth.cheesley@viryagroup.com M: +44 (0) 7920 404314

On 8 May 2015 at 12:33, John Linhart notifications@github.com wrote:

Quick fix could be to turn off the htaccess protection, authorize the plugin and then turn the protection back on. Could you try that? Long story

I tried to modify the plugin so the callback will be to front end of Joomla instead of back end since I think that would solve this issue. For long time the authorization was failing on this line:

https://github.com/mautic/mautic-joomla/blob/master/mautic.php#L255

So clearly the access tokens were not valid. I checked it many times, cleared prod cache of Mautic to be sure that's not it. Nothing helped. I also noticed that Joomla messages were not displaying so I wanted to fix that and that's how I discovered that Joomla uses different cache for back end and front end. Mautic API library stores information to the front end session and then it cannot access it at the back end.

I'm out of ideas how to deal with the 2-session problem. Any ideas?

— Reply to this email directly or view it on GitHub https://github.com/mautic/mautic-joomla/issues/18#issuecomment-100201555 .

Be like me, be Carbon free - don't print this and save a tree IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.

escopecz commented 9 years ago

Hi Ruth, I make the whole auth process go through front end. The downside it that Joomla messages aren't working. So I load last 30 rows of log to the plugin configuration when debug is enabled. That way it will be more obvious what is going on. Please, try this:

https://github.com/escopecz/mautic-joomla/archive/master.zip

Let me know this version work, please.

dongilbert commented 6 years ago

Stale