Skip to content

Commit

Permalink
Merge pull request #49 from Authress/fetch-retries-ios
Browse files Browse the repository at this point in the history
Support non-compliant iOS fetch retries.
  • Loading branch information
wparad authored Sep 3, 2024
2 parents 71e3980 + be4cdc5 commit e7d76ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This is the changelog for [Authress Login](readme.md).
* clear the `nonce` and `iss` parameters from the URL when they are set.
* [Fix] Force a sessionCheck after a logout.
* Validate logout redirect urls to ensure they are valid before attempting to log the user out.
* [Fix] enable iOS 'Load Failed' non-compliant HTTP Fetch retries.

## 2.4 ##
* Prevent silent returns from `authenticate` when a different connectionId is used to have the user log in.
Expand Down
1 change: 1 addition & 0 deletions src/httpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const errorMessages = new Set([
'The Internet connection appears to be offline.', // Safari 16
'Network request failed', // `cross-fetch`
'fetch failed', // Undici (Node.js)
'Load failed', // iOS Fetch failed to respond - https://stackoverflow.com/questions/71280168/javascript-typeerror-load-failed-error-when-calling-fetch-on-ios
'<HTML DOCUMENT></HTML>' // Handle some HTML error page responses as well, or sometimes CDN is having problems, if the response includes an HTML Document, then for sure there was an issue
]);

Expand Down

0 comments on commit e7d76ec

Please sign in to comment.