diff --git a/CHANGELOG.md b/CHANGELOG.md index bec9119a..6c96b104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ X.Y.Z Release notes ### Bug fixes * Fix a bug where `Realm.open` could unexpectedly raise a "Realm at path ... already opened with different schema version" error. +* Increased request timeout for token refresh requests to 10 seconds. This + should help with failing token refreshes on a loaded server. ### Internal * None diff --git a/lib/user-methods.js b/lib/user-methods.js index b0f4210c..c68266cc 100644 --- a/lib/user-methods.js +++ b/lib/user-methods.js @@ -81,7 +81,7 @@ function refreshAccessToken(user, localRealmPath, realmUrl) { headers: postHeaders, // FIXME: This timeout appears to be necessary in order for some requests to be sent at all. // See https://github.com/realm/realm-js-private/issues/338 for details. - timeout: 1000.0 + timeout: 10000.0 }; performFetch(url, options) .then((response) => response.json().then((json) => { return { response, json }; }))