Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
duozerskRina,
It all depends on the provider - many of them don't allow authentication through iframe. What provider are you using?
Thanks
AndyB
Comment #2
rinashah CreditAttribution: rinashah commentedI use FB, twitter and G+ authentication.
Comment #3
duozerskTwitter doesn't support it for sure. Facebook should work; don't have any info on G+.
Comment #4
rinashah CreditAttribution: rinashah commentedok. thanks
Comment #5
duozerskComment #6
rinashah CreditAttribution: rinashah commentedI have been able to solve this using following jquery.
$('.hybridauth-widget-wrapper a').attr('target', '_top');
Comment #7
duozerskRina,
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
Comment #8
rinashah CreditAttribution: rinashah commentedyes, 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 :)
Comment #9
duozerskOh, 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
Comment #10
rinashah CreditAttribution: rinashah commentedI 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.
Comment #11
rinashah CreditAttribution: rinashah commented<a href="/user/login?width=500&height=500&iframe=true" class="colorbox-load">