There is a question Facebook OAuth "Unsupported" in Chrome on iOS where there are fixes with manually redirecting to login screen and back to the original url.
But, I have situation when login button is in the iframe within popup on some page. This popup could be displayed on multiple sites.
Redirect_uri should be the page of facebook application, in this example iframe inside popup. I need it to be redirecting on the original page.
Any ideas?
Update:
Even with Manual login flow, it doesn't work. It's not redirecting me anywhere after login. Just same facebook window with message "Please close this tab to proceed".
Related
I am making google extension that displays iframe with my website.
Website in iframe have Google login button and I need to do this:
After you click login button, you get popup with login
<a href="GOOGLE_LOGIN_URL_OAUTH2" target="popup"
onclick="window.open('GOOGLE_LOGIN_URL_OAUTH2','popup','width=200,height=200'); return false;">
Login with google
</a>
Got it
After successful login I need refresh iframe -> You'll be logged inside iframe
I tried this Spring Social - How to Redirect to original URL or authenticate via Popup/Iframe with reload but it don't work for iframe
And I can't make login in new window because it won't refresh iframe
(sorry for trivial question, i am totally noob at JS/jQuery)
Thanks for replay.
I have a website build in php, in some page i show a iframe with another website link, which displays it's login screen.
Both Websites are in different domain.
Like main website : http://www.abcd.com
Iframe href : http://www.xyz.com
Now my users see a page in abcd.com where there is an iframe like
<iframe src="http://www.xyz.com/" style="width:688px; height:384px;"></iframe>
Which displays the login screen of the xyz.com
Now what i want is, if users login to xyz.com another new tab should open with the homepage, after login of xyz.com and abcd.com tab should get close.
Is it possible to do with javascript or jquery, which works for all the browser including IE 7,8,9 ??
Thanks
Open up a new tab
link
linky
pop up
window.open("foo.html", "_blank");
Put the following javascript code in the <head> tag of the homepage of xyz.com (but don't put it in the login page if you still want to keep the login page inside the iframe):
<script type="text/javascript">
if (top.location!= self.location){
top.location = self.location
}
</script>
now, when opening the home page of xyz.com, this code will break the <iframe> and changes the current tab from abcd.com to the home page of xyz.com
i dont know what you mean, but opening a new tab from iframe is just the normal code.
<button>Open New Tab</button>
hope this helps
What you're trying to do is impossible on your end, you only supply a login page inside the iFrame, therefor you cant control what the "login" button actually does, it's controlled by the other website.
The other website will need to edit the action themselves and add target='_blank', but that wont happen as their users will have another tab when they login.
I have a website where I HAVE to link to another website, this other website contains this code:
if (parent.window.opener) parent.window.opener.location='http://AdvertisingURL';
if (self.parent.frames.length!=0) self.parent.location=document.location;
The link on my site is a normal link with target=_blank, when I click on it, the site containing that code opens in a new windows, and then my website gets redirected to the advertising URL.
How could I block that redirection without any alert message?
I have created a django app. I have implemented a facebook login along with a django login for my app. On clicking the facebook login button, an outh login page pop ups and i able to login bu giving username and password there. But even after signing in, that pop up is not closing, and the new url to be showed after sign in is showed in that same pop up page. The same login page(parent page) for django app stays at the back during this time. Is there a way to close the pop up page once the user is logged in , and the corresponding url redirection to be made in the parent page.? Please help me to solve this , as i am quite new to programming. Also please tell me what all codes i should post here to give you a better idea.
Call this JS in popup page:
window.opener.location.href = "http://some/new/location";
window.close();
So I'm adding a "sign in with Twitter" button onto my web site. I display the twitter sign in in a popup window. When the user signs into to twitter they are redirected back to a page on my site which calls a javascript function on the window.opener to notify the page that sign in has completed and to refresh.
The problem is after twitter redirects the user back to my site window.opener is null. The script works fine if I bypass the twitter sign in page. Also this appears to be a IE issue, as it works fine in firefox.
Any ideas?
Thanks in advance!
check window.opener is null after redirect. If you provide a page of your own domain in the popup first it doesnt loose is parent information. At least that how it works for me.
Maybe you could use a lightbox containing an iframe for the Twitter sign-in. Then you can use "top" instead of "window.opener".