fix: ๐Ÿ› get sso without cert

This commit is contained in:
AP 2020-05-22 11:43:21 +02:00
parent 020482255f
commit 57e7fb86be

View file

@ -2,6 +2,7 @@ import { GraphQLList } from 'graphql';
import { ContextType } from 'api/types/apiTypes';
import { ServerAccountType } from 'api/schemas/types/QueryType';
import { SSO_ACCOUNT } from 'src/context/AccountContext';
import { logger } from 'api/helpers/logger';
import { requestLimiter } from '../../../helpers/rateLimiter';
export const getServerAccounts = {
@ -12,7 +13,10 @@ export const getServerAccounts = {
const { macaroon, cert, host } = sso;
let ssoAccount = null;
if (macaroon && cert && host && ssoVerified) {
if (macaroon && host && ssoVerified) {
logger.debug(
`Macaroon${cert && ', certificate'} and host found for SSO account`
);
ssoAccount = {
name: 'SSO Account',
id: SSO_ACCOUNT,