This commit is contained in:
Daniel Hougaard
2024-09-23 19:14:37 +04:00
parent efdc070579
commit 6e1fb3d500
2 changed files with 5 additions and 8 deletions

View File

@@ -23,8 +23,8 @@ export default class AuthClient {
}
awsIamAuth = {
login: async (options: AwsAuthLoginOptions) => {
const identityId = options.identityId || process.env[MACHINE_IDENTITY_ID_ENV_NAME];
login: async (options?: AwsAuthLoginOptions) => {
const identityId = options?.identityId || process.env[MACHINE_IDENTITY_ID_ENV_NAME];
if (!identityId) {
throw new Error("Identity ID is required for AWS IAM authentication");