diff --git a/server/models/UserAuthentication.ts b/server/models/UserAuthentication.ts index 8527af730..37dde8322 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);