app-check icon indicating copy to clipboard operation
app-check copied to clipboard

AppCheck `token(forcingRefresh: true)` returns cached token if `token(forcingRefresh: false)` in progress

Open andrewheard opened this issue 1 year ago • 0 comments

Calls to token(forcingRefresh:) with forcingRefresh: true may return a cached token if a call is already in progress where forcingRefresh: false. This may be as simple as adding || forcingRefresh to if (self.ongoingRetrieveOrRefreshTokenPromise == nil) (see below) but needs testing.

https://github.com/google/app-check/blob/5746b2d35c91c50581590ed97abe4c06b5037274/AppCheckCore/Sources/Core/GACAppCheck.m#L138-L153

Note: this issue isn't new (already exists in FirebaseAppCheck 10.17.0) but the code has moved to this repo.

andrewheard avatar Nov 08 '23 17:11 andrewheard