Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

[bugfix] Add mfa_duo_device option to aws profile #291

Closed
Closed
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
7 changes: 6 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ func updateMfaConfig(cmd *cobra.Command, profiles lib.Profiles, profile string,
if ok {
config.DuoDevice = mfaDeviceFromEnv
} else {
config.DuoDevice = DefaultMFADuoDevice
duoDevice, _, err := profiles.GetValue(profile, "mfa_duo_device")
if err == nil {
config.DuoDevice = duoDevice
} else {
config.DuoDevice = DefaultMFADuoDevice
}
}
}

Expand Down