Chore: Move SAML org check to permission service

This commit is contained in:
Daniel Hougaard
2024-03-17 18:48:10 +01:00
parent 885d1fbd7f
commit 08b5975f26
2 changed files with 5 additions and 19 deletions
+3 -3
View File
@@ -65,9 +65,9 @@ export const registerLoginRouter = async (server: FastifyZodProvider) => {
// The decoded JWT token, which contains the auth method.
const decodedToken = jwt.verify(authToken, cfg.AUTH_SECRET) as AuthModeJwtTokenPayload;
if (decodedToken.organizationId) {
throw new UnauthorizedError({ message: "You have already selected an organization" });
}
// if (decodedToken.organizationId) {
// throw new UnauthorizedError({ message: "You have already selected an organization" });
// }
const user = await server.services.user.getMe(decodedToken.userId);