Skip to content

Instantly share code, notes, and snippets.

@schlarpc
Last active March 16, 2022 18:55
Show Gist options
  • Save schlarpc/47b0413ab01272876344205ccdc51ea2 to your computer and use it in GitHub Desktop.
Save schlarpc/47b0413ab01272876344205ccdc51ea2 to your computer and use it in GitHub Desktop.
aws-logout.user.js
// ==UserScript==
// @name AWS Console Federation Autologout
// @match https://signin.aws.amazon.com/federation?*
// @grant none
// ==/UserScript==
(function() {
'use strict';
let logout = document.querySelector('a[href^="/oauth?Action=logout"]');
if (logout) {
let iframe = document.createElement("iframe");
iframe.src = logout.href;
iframe.onload = iframe.onerror = function() { document.location.reload(); };
iframe.style.display = 'none';
document.body.appendChild(iframe);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment