From 80ad6cfec8878685e011d802ef3dea0cb4b7d25e Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 8 Jun 2022 08:55:58 +0200 Subject: [PATCH] fix: Expired refreshToken should invalidate session, not check SSO retry task --- server/models/UserAuthentication.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/models/UserAuthentication.ts b/server/models/UserAuthentication.ts index 8527af730c..37dde83226 100644 --- a/server/models/UserAuthentication.ts +++ b/server/models/UserAuthentication.ts @@ -105,9 +105,9 @@ class UserAuthentication extends IdModel { "authenticationProvider must exist for user authentication" ); - await this.refreshAccessTokenIfNeeded(authenticationProvider, options); - try { + await this.refreshAccessTokenIfNeeded(authenticationProvider, options); + const client = authenticationProvider.oauthClient; if (client) { await client.userInfo(this.accessToken);