ag-awsauth 0.0.274 → 0.0.276
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/browser.js +28 -7
- package/package.json +1 -1
package/dist/helpers/browser.js
CHANGED
|
@@ -83,12 +83,17 @@ function getMFA(p) {
|
|
|
83
83
|
const page = yield (0, exports.goToPage)(p.verificationUriComplete);
|
|
84
84
|
//
|
|
85
85
|
(0, log_1.info)('checking for auth request');
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
(
|
|
91
|
-
|
|
86
|
+
try {
|
|
87
|
+
const verif = yield page.waitForSelector('#cli_verification_btn', {
|
|
88
|
+
timeout: config_1.timeoutShortMs,
|
|
89
|
+
});
|
|
90
|
+
if (verif) {
|
|
91
|
+
(0, log_1.info)('clicking auth request button');
|
|
92
|
+
yield verif.click();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
//
|
|
92
97
|
}
|
|
93
98
|
//
|
|
94
99
|
(0, log_1.info)('username block');
|
|
@@ -163,7 +168,23 @@ function getMFA(p) {
|
|
|
163
168
|
}
|
|
164
169
|
}
|
|
165
170
|
try {
|
|
166
|
-
(0, log_1.info)('
|
|
171
|
+
(0, log_1.info)('accept-user-code');
|
|
172
|
+
const messageDiv = yield page.waitForSelector('[data-analytics="accept-user-code"]', {
|
|
173
|
+
timeout: config_1.timeoutShortMs,
|
|
174
|
+
});
|
|
175
|
+
if (messageDiv) {
|
|
176
|
+
(0, log_1.info)('click access prompt');
|
|
177
|
+
yield messageDiv.click();
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
throw new Error('access prompt not found');
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch (e) {
|
|
184
|
+
//
|
|
185
|
+
}
|
|
186
|
+
try {
|
|
187
|
+
(0, log_1.info)('allow-access-button');
|
|
167
188
|
const messageDiv = yield page.waitForSelector('[data-testid="allow-access-button"]', {
|
|
168
189
|
timeout: config_1.timeoutShortMs,
|
|
169
190
|
});
|