agilebits / onepassword-app-extension

1Password Extension for iOS Apps
2.58k stars 311 forks source link

iOS Extension is working in Safari , but not in Chrome #386

Closed totoourworld closed 6 years ago

totoourworld commented 6 years ago

Hello , sir I'm really struggle on working in google chrome browser. It is working fine in safari browser. But not working in chrome browser. How can I do? In Chrome Browser , JS file is not working. Can you give me some advice? Regards. PS: I will pay for this work.

gks commented 6 years ago

Hi @totoourworld

Does the extension appear, but after you tap an item Chrome crashes? If so, please update to the latest Chrome, it has a fix for an issue that occurs in iOS 11 with Chrome.

If tapping an item doesn't fill the data into the page, I'm afraid you'll need to talk to Google about that and report the issue. Google has opted to not use our filling system, so what they do is ask 1Password for the username and password, then they handle filling into the page themselves. Whereas in Safari we handle the filling. Because Google has opted not to use our filling system we're unable to assist with webpages that do not fill.

totoourworld commented 6 years ago

Thanks for your answer. But currently ,When I run the App extension in 'share' in chrome browser in iphone , It is not getting value from JS PreProcessing. Although , Safari got value from JS. Is this what you said , Chrome only selected specified service like 1Password or LastPass?

gks commented 6 years ago

@totoourworld

In Safari we do run the JS preprocessing, but we do not in Chrome.

There are two methods an app developer can use to integrate with 1Password.

The first is using Native App Login. This requires that the developer provide the URL for the search in the 1Password app extension. Tapping an item in the 1Password extension will simply send back to the host application a dictionary containing the username and password. It's up to the developer of the host application to handle filling into the page, this is often used for native application logins, we don't recommend using it for web view filling like Chrome is doing. For the reason you're encountering :)

The second is using Web View Filling. This requires that the developer provide the web view itself, we then manually run the Javascript preprocessing on that view, present the list of related items in 1Password's App Extension, and then upon tapping one will fill into the page for the host application.

Safari works similarly to the second method, except with Safari we have an Info.plist option (see the accessing webpages section of this page for details on how that works), and Safari handles starting the Javascript preprocessing for us.

However Chrome is using option #2, so we will not be doing any preprocessing for the page in Chrome. That is done entirely by Chrome, they simply give us a URL and we pass back the selected username and password from the user's chosen item. So in Chrome you will not get any Javascript Preprocessing done for you.

totoourworld commented 6 years ago

how about in Android? In Android Chrome Browser, is this same?

gks commented 6 years ago

@totoourworld

Can't say I know how that works. This is our iOS project and I'm a member of our iOS team. We have another team that handles Android. The platforms are very different under the hood and therefore have unique implementations because of that.

That said, it sounds like this is actually more of a customer support issue, not a developer related issue. So I'm going to ask that if you have more questions regarding this to write into our support team: support@agilebits.com where we'll continue to assist.

This project is more specifically for developers wishing to integrate 1Password into their applications. Many of which are probably getting emails about our conversation here and unfortunately it is not relevant to their interests, which is why I'd like to move this to email if you would like to continue. We'll continue to get you answers to your questions but without potentially filling the inbox of developers who want to keep up with this project. :)

totoourworld commented 6 years ago

Thanks , sir Really got idea from you. So for implementing action to chrome browser , we need to contact with Google Service?