Last active
March 6, 2025 19:02
-
-
Save jaklan/7d41d7c7c46c755eda24aa8449f218a8 to your computer and use it in GitHub Desktop.
[Tampermonkey] Confirm login in AWS IAM Identity Center
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AWS IAM Identity Center | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @author Jakub Lanski | |
// @description Confirm login in AWS IAM Identity Center. | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=aws.amazon.com | |
// @match https://*.awsapps.com/start/* | |
// @require https://gist.github.com/jaklan/2fb5d31797e0dc320d1450119e14f463/raw | |
// ==/UserScript== | |
"use strict"; | |
(async function () { | |
const acceptButtonId = '[data-analytics="accept-user-code"]'; | |
const acceptButton = await waitForElement(acceptButtonId); | |
acceptButton.click(); | |
const allowButtonId = '[data-analytics="consent-allow-access"]'; | |
const allowButton = await waitForElement(allowButtonId); | |
allowButton.click(); | |
const successAlertId = | |
'[data-analytics="consent-success-device-code-no-scope"]'; | |
await waitForElement(successAlertId); | |
window.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment