Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/cli/src/config/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ describe('validateAuthMethod', () => {
'• GOOGLE_API_KEY environment variable (if using express mode).\n' +
'Update your environment and try again (no reload needed if using .env)!',
},
{
description: 'should return null for GATEWAY',
authType: AuthType.GATEWAY,
envs: {},
expected: null,
},
{
description: 'should return an error message for an invalid auth method',
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/config/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ export async function validateAuthMethod(
return null;
}

if (authMethod === AuthType.GATEWAY) {
return null;
}

return 'Invalid auth method selected.';
}