Skip to content

Enable DOM storage so onAuthorizationCompleted fires for ACS pages that need localStorage#44

Open
jim-daf wants to merge 1 commit into
LivotovLabs:masterfrom
jim-daf:fix/dom-storage-issue-12
Open

Enable DOM storage so onAuthorizationCompleted fires for ACS pages that need localStorage#44
jim-daf wants to merge 1 commit into
LivotovLabs:masterfrom
jim-daf:fix/dom-storage-issue-12

Conversation

@jim-daf
Copy link
Copy Markdown

@jim-daf jim-daf commented Apr 22, 2026

Enable DOM storage by default

Resolves #12

Several banks (Swedish issuers reported in the linked issue, and a few
others I have hit while integrating) refuse to advance past the 3D Secure
page unless window.localStorage is available. The ACS script reads or
writes a small key, gets a SecurityError, and the form that should have
been posted to the postback URL is never produced. From the app side that
looks like onAuthorizationCompleted never being called.

The fix is one line. Turn on DOM storage in initUI so the WebView matches
what every modern browser already does.

getSettings().setDomStorageEnabled(true);

Why this is safe

DOM storage is sandboxed per origin. Enabling it does not expose any new
data to the host app and it is a strict superset of the previous behaviour.
Pages that did not need it before will not notice the change.

Testing

Local smoke test against a sandbox 3DS flow that previously stalled now
completes and triggers the listener.

Many ACS pages depend on window.localStorage to drive the
authentication flow. Without it onAuthorizationCompleted is never
called because the ACS page silently fails before posting the form.

Fixes LivotovLabs#12
@jim-daf jim-daf marked this pull request as ready for review April 22, 2026 18:37
Copilot AI review requested due to automatic review settings April 22, 2026 18:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables DOM storage in D3SView’s WebView settings so 3DS (ACS) pages that rely on window.localStorage can complete and trigger onAuthorizationCompleted, addressing the reported issuer/bank stall.

Changes:

  • Enable DOM storage by default in D3SView.initUI() via WebSettings#setDomStorageEnabled(true).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onAuthorizationCompleted() not called for some banks without enabling webview.getSettings().enableDomStorage()

2 participants