Enable DOM storage so onAuthorizationCompleted fires for ACS pages that need localStorage#44
Open
jim-daf wants to merge 1 commit into
Open
Enable DOM storage so onAuthorizationCompleted fires for ACS pages that need localStorage#44jim-daf wants to merge 1 commit into
jim-daf wants to merge 1 commit into
Conversation
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
There was a problem hiding this comment.
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()viaWebSettings#setDomStorageEnabled(true).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.localStorageis available. The ACS script reads orwrites a small key, gets a
SecurityError, and the form that should havebeen posted to the postback URL is never produced. From the app side that
looks like
onAuthorizationCompletednever being called.The fix is one line. Turn on DOM storage in
initUIso the WebView matcheswhat every modern browser already does.
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.