We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68e023b commit 6c81f60Copy full SHA for 6c81f60
src/services/index.ts
@@ -310,7 +310,18 @@ export default class Provider extends CloudGraph.Client {
310
if (profile && profile !== 'default') {
311
let creds: AWS.Credentials
312
const credsFunction = fromIni({
313
- profile
+ profile,
314
+ // MFA token support
315
+ mfaCodeProvider: async () => {
316
+ const { mfaToken = '' }: { mfaToken: string } = await this.interface.prompt([
317
+ {
318
+ type: 'input',
319
+ message: `Please enter the MFA token for ${profile}`,
320
+ name: 'mfaToken'
321
+ },
322
+ ])
323
+ return mfaToken
324
+ }
325
})
326
if (creds) {
327
sts = new AWS.STS({ credentials: await credsFunction() })
0 commit comments