Last active
August 19, 2021 05:47
-
-
Save RunasSudo/b49508b2d7cd1a8a0cb17824cf9177d6 to your computer and use it in GitHub Desktop.
π¦π¦ Okta is gone! π¦π¦
This file contains 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 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); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Could you add instructions for running this?
Thanks!