Hi,

I am using iframe popuo of colorbox module for login/registration for one of my websites and found that hybrid authentication doesn't work within the iframe. If I remove iframe, it works fine though.

Please let me know how can i get it working within colorbox iframe.\

Many thanks
rina

Comments

duozersk’s picture

Assigned: Unassigned » duozersk
Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Rina,

It all depends on the provider - many of them don't allow authentication through iframe. What provider are you using?

Thanks
AndyB

rinashah’s picture

I use FB, twitter and G+ authentication.

duozersk’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Twitter doesn't support it for sure. Facebook should work; don't have any info on G+.

rinashah’s picture

Status: Closed (works as designed) » Closed (won't fix)

ok. thanks

duozersk’s picture

Status: Closed (won't fix) » Closed (works as designed)
rinashah’s picture

I have been able to solve this using following jquery.

$('.hybridauth-widget-wrapper a').attr('target', '_top');

duozersk’s picture

Status: Closed (works as designed) » Postponed (maintainer needs more info)

Rina,

Thank you for the follow-up and the time you put into this.

To be clear, you have been able to use Colorbox overlay to authenticate through Twitter (let's start with this provider) using the above jQuery snippet, correct?

Thanks
AndyB

rinashah’s picture

yes, so the idea is to quit colorbox iframe as soon as someone clicks on one of the provider. Tested with twitter, G+ and FB. This JS opens the link in parent window and hence the authentication works fine :)

duozersk’s picture

Status: Postponed (maintainer needs more info) » Needs work

Oh, I thought you are using colorbox not to show the login form and provider icons, but to open up the provider authentication workflow after the click on the provider has already happened (you can set this up in the settings for every provider individually).

Then I need to check what we can do with your situation, might be a bug. Could you please share the code you use to open up the login/registration form as the iframe popup? Or is it the standard functionality of the Colorbox module?

AndyB

rinashah’s picture

I use the standard colorbox iframe link

Authentication was working fine without iframe but within iframe, it was not. By the JQuery mentioned above, I can kick off iframe on any of the service provider link and let it load on the parent window.

rinashah’s picture

<a href="/user/login?width=500&height=500&iframe=true" class="colorbox-load">