Skip to content

Commit bedec89

Browse files
Merge pull request #4114 from RedisInsight/be/bugfix/fix-ensure-token
fix ensure token functionality
2 parents 65c65ff + 603b127 commit bedec89

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/tests-integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ env:
4848
}
4949
ITESTS_NAMES_SHORT: |
5050
{
51+
"mods-preview": "OSS Standalone and all preview modules",
5152
"oss-st-5-pass": "OSS Standalone v5 with admin pass required",
5253
"oss-st-6-tls-auth": "OSS Standalone v6 with TLS auth required",
5354
"oss-clu-tls": "OSS Cluster with TLS enabled",

redisinsight/api/src/modules/cloud/user/cloud-user.api.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ export class CloudUserApiService {
6767
try {
6868
const session = await this.sessionService.getSession(sessionMetadata.sessionId);
6969

70-
if (!session?.refreshToken) {
71-
throw new CloudApiUnauthorizedException();
72-
}
73-
7470
if (!isValidToken(session?.accessToken)) {
71+
if (!session?.refreshToken) {
72+
throw new CloudApiUnauthorizedException();
73+
}
74+
7575
await this.cloudAuthService.renewTokens(sessionMetadata, session?.idpType, session?.refreshToken);
7676
}
7777
} catch (e) {

0 commit comments

Comments
 (0)