PureStake / algosigner

AlgoSigner is an open source Algorand wallet extension that makes it easier than ever to use ALGOs for payment, investing, or swapping assets. Available in the Chrome Web Store.
MIT License
92 stars 58 forks source link

Inject Algosigner also into Iframes #320

Open andpay-io opened 2 years ago

andpay-io commented 2 years ago

Hi,

We're Andpay - building the first pure PSP fully on the Algorand blockchain. Lately we've integrated support with Algosigner, however we found out that Algosigner isn't compatible with our embeddable components (iframe based).

We noticed that the JS file that's being added is only injected in the top-level document frame and not on all the underlying iframes within that page. Could the Algosigner extension be updated with:

"content_scripts": [ { ... "all_frames": true, ... } ], As explained here: https://developer.chrome.com/docs/extensions/mv3/content_scripts/#frames

This should potentially make it possible to also run Algosigner support within iframes. Hope to see this implemented soon - as currently Algosigner won't be offered as Payment option within our embeddable components.

andpay-io commented 2 years ago

Hi @janmarcano,

Any chance that this will be picked up in any of the upcoming releases? Thanks!

janmarcano commented 2 years ago

Hello! We're currently evaluating the impact it would have on pages with lots of iframes, as that would load AlgoSigner everywhere, even on sites that have nothing to do with AlgoSigner/Algorand.

I'll be sure to let you know if/when we decide to tackle this for a future update.

andpay-io commented 2 years ago

Hi @janmarcano,

Thanks! Maybe another option could be to only add it to iframes that have a certain class or property. Could minimise impact, but helps re-usability for cases like ours.

mataide commented 2 years ago

Need that as well.

mataide commented 2 years ago

@andpay-io do you know if it's possible to do a workaround?

andpay-io commented 2 years ago

@mataide Unfortunately not, we haven't found a workaround for this issue.