diff --git a/CHANGELOG.md b/CHANGELOG.md index 8672dfd4..c1b5a08c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Bug fixes * Fixed port conflict between RN >= 0.48 inspector proxy and RPC server used for Chrome debugging (#1294). +* An issue where access tokens were not refreshed correctly has been addressed. ### Internal * Alignment of permission schemas. diff --git a/lib/user-methods.js b/lib/user-methods.js index 7296474b..0f317644 100644 --- a/lib/user-methods.js +++ b/lib/user-methods.js @@ -76,7 +76,10 @@ function refreshAccessToken(user, localRealmPath, realmUrl) { provider: 'realm', app_id: '' }), - headers: postHeaders + 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 }; performFetch(url, options) .then((response) => response.json().then((json) => { return { response, json }; }))