braintree / popup-bridge-ios

Enable your web view to open pages in an ASWebAuthenticationSession
MIT License
38 stars 20 forks source link

Add support for URL fragment parsing #13

Closed skunkworks closed 6 years ago

skunkworks commented 6 years ago

What it does

Currently we only pass the URL path and query string, e.g. https://popupbridgev1/hi?foo=bar#baz=qux will return the following JS object:

{
  "path": "/there",
  "queryItems": { "foo": "bar" }
}

This PR adds support for returning the URL fragment in the PopupBridge payload as hash, e.g. with the previous example URL, it'd return:

{
  "path": "/there",
  "queryItems": { "foo": "bar" }
  "hash": "baz=qux"
}

Why

This allows PopupBridge to support cases where meaningful data is passed back in the URL fragment.