# UNSW Online Account
**Source**: https://recharge.it.unsw.edu.au/mymonitor/
**Parent**: https://www.library.unsw.edu.au/
Welcome to UNSW Online Account
\
Sign in via zID(e.g. z5432109) / Casual ID
zID(e.g. z5432109) / Casual ID
Password
Log in
zID(e.g. z5432109) / Casual ID
[Single sign-on](https://recharge.it.unsw.edu.au/mymonitor/saml-client.php)
[Terms and Conditions](https://recharge.it.unsw.edu.au/mymonitor/terms.php "Show Terms and Conditions in a new window")
| [Help](https://recharge.it.unsw.edu.au/mymonitor/help.php "Show help in a new window")
*Powered by [Monitor](https://www.monitorbm.com)*
function setLoginFormHiddenField(name, value) {
var f = $('#loginForm input[name=' + name + ']');
if (f.length) {
f.attr('value', value);
} else {
$('<input>').attr('hidden', 'text').attr('name', name).attr('value', value).attr("class", "input-additional\_fields").appendTo('#loginForm');
}
}
function checkPrimaryAccount(el\_btn) {
var el\_login\_wrapper = $(el\_btn).closest('.html-login\_method\_wrapper'),
login\_key = $(el\_login\_wrapper).find(".input-primary\_login").val(),
login\_method = $(el\_login\_wrapper).data("login\_method"),
request\_token = $("#input-requestToken").val();
remember\_me = $('input[name="rememberMe').is(':checked') ;
if (login\_key.length == 0) {
showSitePopupDialog('Login details is required', 'Error', true);
} else {
showSiteLoadingDialog();
$.get(
"login\_action.php",
{
pa: 'check\_account',
requestToken: request\_token,
login\_method: login\_method,
login\_key: login\_key,
remember\_me: remember\_me,
},
function (data) {
request\_token = data.requestToken;
var $loginForm = $('#loginForm') ;
$("#input-requestToken", $loginForm).val(request\_token);
if (data.ok) {
switch (data.mode) {
// [MMc] 20230814 BOF 17623: Phase II public printing
case 'newAccount' :
location.href = data.goto ;
return;
break;
case 'submit' :
$('input[name="requestToken"]', $loginForm).val(data.requestToken) ;
document.getElementById("loginForm").submit()
return;
break;
// [MMc] 20230814 EOF 17623: Phase II public printing
case 'reset\_password':
location.href = "password\_reset\_required.php";
return;
break;
case 'pin':
hideSitePopupDialog();
var dialog\_title = 'Your PIN',
dialog\_buttons = {
'Continue': function () {
submitPin();
}
},
dialog\_body = '<label for="input-pin">Enter your PIN</label>' +
'<input type="password" data-login\_method="' + login\_method + '" id="input-pin" class="form-control" title="Enter your Pin" autocomplete="new-password">';
$('#html-site\_popup\_dialog').dialog({
dialogClass: 'pin\_dialog\_style',
autoOpen: true,
modal: true,
title: dialog\_title,
buttons: dialog\_buttons,
open: function () {
$(this).html(dialog\_body);
// [ML] make button blue
$("#input-primary\_password").focus();
$('.ui-dialog-buttonpane').find('button').addClass('okButtonStyle');
},
close: function (event, ui) {
$(this).empty().dialog('destroy');
}
});
return;
break;
case 'password\_locked':
location.href = "account\_locked.php";
return;
break;
default:
hideSitePopupDialog();
var dialog\_title = 'Your Password',
dialog\_buttons = {
'Continue': function () {
submitPrimaryPassword();
}
},
dialog\_body = '<label for="input-primary\_password">Enter your password</label>' +
'<input type="password" data-login\_method="' + login\_method + '" id="input-primary\_password" class="form-control" title="Enter your Password" autocomplete="new-password">';
$('#html-site\_popup\_dialog').dialog({
dialogClass: 'pin\_dialog\_style',
autoOpen: true,
modal: true,
title: dialog\_title,
buttons: dialog\_buttons,
open: function () {
$(this).html(dialog\_body);
// [ML] make button blue
$("#input-primary\_password").focus();
$('.ui-dialog-buttonpane').find('button').addClass('okButtonStyle');
},
close: function (event, ui) {
$(this).empty().dialog('destroy');
}
});
break;
}
} else {
hideSitePopupDialog();
switch (data.mode) {
case 'token\_expired':
hideSitePopupDialog();
$('#html-site\_popup\_dialog').dialog({
dialogClass: 'pin\_dialog\_style',
autoOpen: true,
modal: true,
title: 'Error',
buttons: {},
open: function () {
$(this).html(data.errorMessage);
},
close: function (event, ui) {
location.reload();
$(this).empty().dialog('destroy');
}
});
break;
default:
showSitePopupDialog(data.errorMessage, 'Error', true);
break;
}
}
},
"json"
).fail(function (xhr, status, error) {
alert(xhr.responseText);
});
}
}
function handleEnterKey(event, id) {
if (event.keyCode === 13) {
$('#' + id).click();
event.preventDefault ? event.preventDefault() : (event.returnValue = false);
return false;
}
return true;
}
function submitPrimaryPassword() {
var el\_password = $("#input-primary\_password"),
input\_password = $(el\_password).val(),
login\_method = $(el\_password).data("login\_method");
if (input\_password.length > 0) {
setLoginFormHiddenField('pswdFieldPrimaryNumber', input\_password);
setLoginFormHiddenField('loginMode', login\_method);
$('#loginForm').submit();
} else {
showSitePopupDialog('Password cannot be blank', 'Error', true);
}
}
function submitPin() {
var el\_pin = $("#input-pin"),
input\_pin = $(el\_pin).val(),
login\_method = $(el\_pin).data("login\_method");
if (input\_pin.length > 0) {
setLoginFormHiddenField('loginMethod', 'pin');
setLoginFormHiddenField('loginPin', input\_pin);
setLoginFormHiddenField('loginMode', login\_method);
$('#loginForm').submit();
} else {
showSitePopupDialog('Password cannot be blank', 'Error', true);
}
}
$(function () {
$("body").on('keypress', '#input-primary\_password', function(e) {
if (e.keyCode == 13) {
e.preventDefault();
submitPrimaryPassword();
}
});
// [ML] user send password, submit login form
$("#loginForm").submit(function(e) {
var rsa = initialiseRSA(document.loginForm.exponent.value, document.loginForm.modulus.value, parseInt(document.loginForm.bits.value));
if (document.getElementById('loginFieldUsername') != null) {
if (document.loginForm.loginFieldUsername.value.length > 0) {
document.loginForm.loginFieldUsername.value = encrypt(rsa, document.loginForm.loginFieldUsername.value);
}
}
if (document.getElementById('pswdFieldUsername') != null) {
if (document.loginForm.pswdFieldUsername.value.length > 0) {
document.loginForm.pswdFieldUsername.value = encrypt(rsa, document.loginForm.pswdFieldUsername.value);
}
}
if (document.getElementById('loginPin') != null) {
if (document.loginForm.loginPin.value.length > 0) {
document.loginForm.loginPin.value = encrypt(rsa, document.loginForm.loginPin.value);
}
}
if (document.getElementById('loginFieldEmail') != null) {
if (document.loginForm.loginFieldEmail.value.length > 0) {
document.loginForm.loginFieldEmail.value = encrypt(rsa, document.loginForm.loginFieldEmail.value);
}
}
if (document.getElementById('pswdFieldEmail') != null) {
if (document.loginForm.pswdFieldEmail.value.length > 0) {
document.loginForm.pswdFieldEmail.value = encrypt(rsa, document.loginForm.pswdFieldEmail.value);
}
}
if (document.getElementById('loginFieldPrimaryNumber') != null) {
if (document.loginForm.loginFieldPrimaryNumber.length > 0) {
document.loginForm.loginFieldPrimaryNumber.value = encrypt(rsa, document.loginForm.loginFieldPrimaryNumber.value);
}
}
if (document.getElementById('pswdFieldPrimaryNumber') != null) {
if (document.loginForm.pswdFieldPrimaryNumber.value.length > 0) {
document.loginForm.pswdFieldPrimaryNumber.value = encrypt(rsa, document.loginForm.pswdFieldPrimaryNumber.value);
}
}
document.loginForm.modulus.value = '';
showSiteLoadingDialog();
return true;
});
$("input").keypress(function(e) {
if (e.keyCode == 13) {
e.preventDefault();
if ($(this).attr("name") == 'rememberMe') {
$(this).closest('.html-login\_method\_wrapper').find(".btn-primary\_login").trigger("click");
}
}
});
$(".input-primary\_login").keypress(function(e) {
if (e.keyCode == 13) {
e.preventDefault();
$(this).closest('.html-login\_method\_wrapper').find(".btn-primary\_login").trigger("click");
}
});
$(".btn-primary\_login").click(function (e) {
e.preventDefault();
checkPrimaryAccount($(this));
});
$(".btn-primary\_login").keypress(function (e) {
if (e.keyCode == 13) {
e.preventDefault();
checkPrimaryAccount($(this));
}
});
$(".input-email\_login").keypress(function(e) {
if (e.keyCode == 13) {
$(".btn-email\_login").trigger("click");
e.preventDefault();
}
});
$(".btn-email\_login").click(function (e) {
e.preventDefault();
setLoginFormHiddenField('loginMode', 'Email');
$('#loginForm').submit();
});
$(".input-username\_login").keypress(function(e) {
if (e.keyCode == 13) {
$(".btn-username\_login").trigger("click");
e.preventDefault();
}
});
$(".btn-username\_login").click(function (e) {
e.preventDefault();
//setLoginFormHiddenField('submitBtnUsername', 'y');
setLoginFormHiddenField('loginMode', 'Username');
$('#loginForm').submit();
});
$(".html-login\_method\_wrapper .btn-toggle\_login\_method").click(function() {
if ($(this).data("ip\_provider") == 'Google' || $(this).data("ip\_provider") == 'Facebook') {
return true;
}
// hide all .html-login\_method
$(".html-login\_method\_wrapper .html-login\_method").addClass('d-none');
// delete all hidden fields
$(".input-additional\_fields").remove();
// clear input for all other login method stop it from bing POSTED
$(".html-login\_method\_wrapper .html-login\_method").find("input[type=text], input[type=password]").val('');
// show all .btn-toggle\_login\_method
$(".html-login\_method\_wrapper .btn-toggle\_login\_method").removeClass('d-none');
// hide current btn
$(this).addClass('d-none');
var el\_wrapper = $(this).closest('.html-login\_method\_wrapper')
, el\_first\_input = $(el\_wrapper).find(".form-control:first")
, remember\_me\_box = $('#rememberMe').closest('.optionBox')
, login\_button = $('input[type="submit"],button', el\_wrapper).first()
;
// show the current .html-login\_method form
$(el\_wrapper).find(".html-login\_method").removeClass('d-none');
remember\_me\_box.insertBefore(login\_button) ;
$(el\_first\_input).focus();
});
// [ML] if only 1 login\_method, opens that one
if ($(".html-login\_method\_wrapper").length == 1) {
$(".html-login\_method\_wrapper .btn-toggle\_login\_method").trigger("click");
}
});