chore: add e2e test for refresh tokens cooldown period - skip e2e (#2860)
* chore: add e2e test for refresh tokens cooldown period * chore: fix refreshing session in e2e * chore: fix session refresh cooldown test * chore: fix e2e test * Add dropped response simulation test --------- Co-authored-by: moughxyz <mo@standardnotes.com>
This commit is contained in:
@@ -874,7 +874,14 @@ export class SessionManager
|
||||
const willRefreshTokenExpireSoon = refreshTokenExpiration.getTime() - Date.now() < ThirtyMinutes
|
||||
|
||||
if (willAccessTokenExpireSoon || willRefreshTokenExpireSoon) {
|
||||
return this.httpService.refreshSession()
|
||||
const refreshSessionResultOrError = await this.httpService.refreshSession()
|
||||
if (refreshSessionResultOrError.isFailed()) {
|
||||
return false
|
||||
}
|
||||
|
||||
const refreshSessionResult = refreshSessionResultOrError.getValue()
|
||||
|
||||
return isErrorResponse(refreshSessionResult)
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user