Skip to content

Instantly share code, notes, and snippets.

@RunasSudo
Last active August 19, 2021 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RunasSudo/b49508b2d7cd1a8a0cb17824cf9177d6 to your computer and use it in GitHub Desktop.
Save RunasSudo/b49508b2d7cd1a8a0cb17824cf9177d6 to your computer and use it in GitHub Desktop.
πŸ¦€πŸ¦€ Okta is gone! πŸ¦€πŸ¦€
// ==UserScript==
// @name Okta Autologin
// @namespace https://github.com/RunasSudo
// @version 0.1
// @description Automatically log into Okta
// @author Yingtong Li
// @match https://monashuni.okta.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var user = 'USERNAME@student.monash.edu';
var pass = 'YOUR_PASSWORD_HERE';
var interval1 = setInterval(function() {
if (document.querySelector('#okta-signin-username')) {
document.querySelector('#okta-signin-username').value = user;
document.querySelector('#okta-signin-username').dispatchEvent(new Event('change', {'bubbles': true}));
document.querySelector('#okta-signin-password').value = pass;
document.querySelector('#okta-signin-password').dispatchEvent(new Event('change', {'bubbles': true}));
document.querySelector('#okta-signin-submit').click();
clearInterval(interval1);
}
}, 100);
})();
@cigarplug
Copy link

Hi! Could you add instructions for running this?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment