From 5fa8ebc587dca1b9b67f48e058164aa1fe64aa8d Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 18 Jun 2023 07:36:45 -0400 Subject: [PATCH] fix: Unneccessary retry of ValidateSSO task --- server/models/UserAuthentication.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/models/UserAuthentication.ts b/server/models/UserAuthentication.ts index ee3433b4f..efab307d1 100644 --- a/server/models/UserAuthentication.ts +++ b/server/models/UserAuthentication.ts @@ -11,7 +11,6 @@ import { Unique, } from "sequelize-typescript"; import Logger from "@server/logging/Logger"; -import { AuthenticationError } from "../errors"; import AuthenticationProvider from "./AuthenticationProvider"; import User from "./User"; import IdModel from "./base/IdModel"; @@ -121,7 +120,7 @@ class UserAuthentication extends IdModel { return true; } catch (error) { - if (error instanceof AuthenticationError) { + if (error.id === "authentication_required") { return false; }