pinterest / pinterest-api-demo

Apache License 2.0
106 stars 63 forks source link

Fails when Pinterest app is installed and on Chrome for Android entirely #7

Closed amustill closed 8 years ago

amustill commented 8 years ago

On both Android and iOS, the authentication process fails when the Pinterest app is installed.

The flow for both failures is the same:

  1. Click Login
  2. Jumps to Pinterest app and in to WebView
  3. Asks for login if not logged in via browser, despite being logged in to the Pinterest app
  4. Login / Authorise demo app
  5. Returns a "Not in a popup or browser doesn't support postMessage." within Pinterest app WebView

Android: https://cloud.githubusercontent.com/assets/448157/16560907/0c7f49a4-41ee-11e6-89cd-fe11b9733de3.gif

(Note: I am already logged in to Pinterest within Chrome, hence no login screen per point 3).

iOS: https://cloud.githubusercontent.com/assets/448157/16560892/003b2320-41ee-11e6-8a56-7c25d6e22fb4.gif

The failure becomes even more dramatic when attempting to authenticate with Pinterest via Facebook. On iOS, after authenticating you are simply shipped to the Pinterest app. No redirect or handling of the authentication at all.

Moreover, the authentication process fails on Chrome for Android entirely - even when you bypass the Pinterest app: https://cloud.githubusercontent.com/assets/448157/16560879/ebd971f2-41ed-11e6-8479-df9608c8a8c8.gif

This is not the case for the 'Internet' app on Samsung devices, where the flow works as intended. I have not tested any other devices.

arunranga commented 8 years ago

Greetings @amustill ,

This is an issue we're working on fixing. The problem is caused by the fact that we've rewritten www.pinterest.com/login to invoke the app (Universal Links, etc.). We're actively working to resolve it.

amustill commented 8 years ago

Thanks for the response @arunranga.

Is there currently a roadmap for when this may be fixed?

Also, this may not be the best repo for this discussion - is there another repo or communication channel I can subscribe to in order to follow updates?

arunranga commented 8 years ago

@amustill : you're right, this isn't exactly the best repo for this discussion, but it's good enough, since it concerns use of the API on the web (other repos are SDK-specific). Few updates here:

  1. We've largely fixed this problem for iOS. If you test again, you should be good to go. The nuts and bolts of the fix are basically a new login domain that falls outside of the link handoff (Universal Links) between browser(s) and the Pinterest app. We regard this fix as temporary -- that is, we'd eventually like to roll out a more comprehensive fix, but till we do, what we have in place will hold.
  2. The problem on Android is a bit harder since server-side configs alone won't do the trick (in-app manifest, etc.). So, Android is still seeing the problem, and the most likely fix will involve a change to Pinterest on Android, so that's a new build / update.

Summary: more work needed on Android :-/ Test on iOS / reporting back here would be useful :)

amustill commented 8 years ago

@arunranga Thanks for the update.

We see it working on iOS, which is a great improvement. We'll test it a little more rigorously and comment here for any failing cases we find.

arunranga commented 8 years ago

@amustill : and now the fix works on Android :) However, unlike on iOS, where we could make a fix that didn't involve touching the Pinterest app on iOS, for Android we had to release the fix in an update to the Pinterest for Android app. We were scheduled to do a release yesterday, and we included the fix for this. The new Pinterest for Android is now available to 100%. Hopefully within a short period of time most users will have the fix.

So, you should also report back on tests on Android. As long as the latest version of the app is present on Android, we anticipate that it should work now.

amustill commented 8 years ago

@arunranga Great news! We've just tested this and everything seems smooth.

Again, we'll test it a little more and report any failing cases we find but it certainly looks like it's fully resolved. Thanks for the communication and updates, it's really appreciated.

amustill commented 8 years ago

@arunranga Just a note to say we now consider this resolved. Many thanks for your help.