Firebase SSO Auth not working in Facebook In App Browser - facebook

We are using Firebase Auth and provide Google and Facebook login on our site.
We are a publisher and most of our stories are published as Instant Articles. However, some articles are locked and requires subscribers to login to read the full content.
This works in a normal browser, but when opening a non-IA link in FB In App Browser, the login popup appears but remains blank, and does not close.
Users are not signed in and can't login.
We are using:
firebase.auth().signInWithPopup(provider)
I was wondering if there are any ways besides the signInWithPopup that can help us achieve this?
Thx.

As #bojeil mentioned,
use firebase.auth().signInWithRedirect(provider) instead.

Related

How to require user to login fb before accessing Facebook Canvas App webpapge directly?

I am new to Facebook App. I am developing my first Facebook Canvas App which links to a webpage hosting on my server.
I can now access the app by either:
(1) go to the Facebook App (http://apps.facebook.com/myappname), or
(2) directly access the webpage through URL(http://mywebsite.com/myapp).
I have set http://mywebsite.com/myapp as my canvas page in FB dashboard settings.
I want to avoid (2) by requiring user to login FB first before they can access the page. I would like to know how can I do that?
This may be a stupid question, but I have read the FB API documents (FB official guide talks a lot about setting custom login page) and searched through a lot of questions but they doesn't seem to fit what I need.
UPDATE:
I have tried something like putting the following in my webpage:
<script> top.location.href = 'http://apps.facebook.com/myappname'</script>
In this case, if user access the page by (1), there's no problem. If user access the page by (2), user will be redirected to Facebook.
However in the client side we can still view the content of the webpage even if user is not logging in to Facebook. I want to achieve this in the server side.
Thank you very much!
I have already solved the problem by using examples from Facebook PHP SDK version 3.
https://github.com/facebookarchive/facebook-php-sdk/blob/master/examples/example.php

LOGIN into facebook or google from another domain

I there anyway to log users to facebook and google gmail, from another domain site?
Or are there specific API to do that?
I'm not talking about fb login or connect or google login API, i'm talking about "triggering" login forms in some whay or launch requests to sites to login in users.
I would like to make users able to log to facebook from another site, setting up cookies, so when he will return to facebook he will be logged, and viceversa.
And if is there, is it legal or not?
Thanks
Thats not possible, since Facebook are the ones that issue the cookies, I think it might be possible to generate a cookie that will log you into Facebook, but it would be illegal. Swift

How to get Facebook access token and User ID on iphone

I want to make a demo of using OAuth to get a facebook access token in a mobile app.
i have a button on the main view. After button is clicked, I use safari to open the facebook OAuth dialog. After logging in to facebook, I can't figure out how to get the access token and UserID.
You need to spend some time reading the documentation on how Facebook works with iOS. Specifically there is a whole documentation section dedication to iOS authentication.
The way you are currently doing it with redirecting to Safari is not the preferred way of handling this as far as I know.

Facebook C# SDK. How to automatic login user if they already login from facebook.com?

Here's the problem,
I want to have the user auto login to my MVC3 website if they already login from facebook.com.
If they are not login from facebook.com, I will just simply show a login button and they can login by clicking on it as usual.
I cant seem to find a way to detect whether user had login from facebook.com unless I force the application to direct go into LoginUrl of Facebook, which is not good for user who was not logged in as this will prompt them a page where they have to login. I still want to allow guest access without facebook account.
Any idea? Thanks a million.
EDIT:
Sorry I forgot to mentioned the situation only apply to user who approve to use my app. Once they approve to use my app, I'll be able to detect their facebook login status.
The answer is: You can't. At least not without violating the facebook TOS and probably at least one or two laws.
EDIT: Your original question sounded like you wanted to try and hijack the facebook user session. What you are talking about here in the comments requires you to use facebook connect / facebook for websites.
You would want to start here: https://developers.facebook.com/docs/guides/web

Facebook remember me

I want to implement a "remember me" feature on me website using the facebook connect.
On my website, i have the possibility to do the login by two distinct ways:
Normal login
Facebook Connect
When an user performs the login with facebook connect, even if he logs out on his facebook account, i want to keep him logged in on my website. He will only log out if he clicks on the logout button on the website.
Is there a way to do this?
Thanks in advance
Here is a tutorial using PHP that demostrates how to use Facebook connect. If you read the section about the login page, you'll see that Facebook does some funky javascripting that creates session cookies on your domain based on the login status on Facebook. You might be able to manipulate the API to give yourself the persistance that you're looking for.
Good luck, and hope this helps some in your project.