Last active
October 3, 2022 13:56
-
-
Save saltukalakus/cddbc16f534cebfafe25e606324f3793 to your computer and use it in GitHub Desktop.
Change size of the placeholder
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Sign In with Auth0</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" /> | |
<style> | |
.auth0-lock-name { | |
font-size: 14px !important; | |
} | |
.auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-input { | |
font-size: 10px !important; | |
} | |
</style> | |
</head> | |
<body> | |
<!--[if IE 8]> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/ie8/0.2.5/ie8.js"></script> | |
<![endif]--> | |
<!--[if lte IE 9]> | |
<script src="https://cdn.auth0.com/js/base64.js"></script> | |
<script src="https://cdn.auth0.com/js/es5-shim.min.js"></script> | |
<![endif]--> | |
<script src="https://cdn.auth0.com/js/lock/11.32/lock.min.js"></script> | |
<script> | |
// Decode utf8 characters properly | |
var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@')))); | |
config.extraParams = config.extraParams || {}; | |
var connection = config.connection; | |
var prompt = config.prompt; | |
var languageDictionary; | |
var language; | |
if (config.dict && config.dict.signin && config.dict.signin.title) { | |
languageDictionary = { title: config.dict.signin.title }; | |
} else if (typeof config.dict === 'string') { | |
language = config.dict; | |
} | |
var loginHint = config.extraParams.login_hint; | |
var colors = config.colors || {}; | |
// Available Lock configuration options: https://auth0.com/docs/libraries/lock/v11/configuration | |
var lock = new Auth0Lock(config.clientID, config.auth0Domain, { | |
auth: { | |
redirectUrl: config.callbackURL, | |
responseType: (config.internalOptions || {}).response_type || | |
(config.callbackOnLocationHash ? 'token' : 'code'), | |
params: config.internalOptions | |
}, | |
configurationBaseUrl: config.clientConfigurationBaseUrl, | |
overrides: { | |
__tenant: config.auth0Tenant, | |
__token_issuer: config.authorizationServer.issuer | |
}, | |
assetsUrl: config.assetsUrl, | |
allowedConnections: connection ? [connection] : null, | |
rememberLastLogin: !prompt, | |
language: language, | |
languageBaseUrl: config.languageBaseUrl, | |
languageDictionary: languageDictionary, | |
languageDictionary: { | |
usernameOrEmailInputPlaceholder: 'Codice Univoco', | |
passwordInputPlaceholder: 'Ultime cinque cifre della Carta di Credito' | |
}, | |
theme: { | |
//logo: 'YOUR LOGO HERE', | |
primaryColor: colors.primary ? colors.primary : 'green' | |
}, | |
prefill: loginHint ? { email: loginHint, username: loginHint } : null, | |
closable: false, | |
defaultADUsernameFromEmailPrefix: false | |
}); | |
lock.show(); | |
</script> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Sign In with Auth0</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" /> | |
<style> | |
.auth0-lock-name { | |
font-size: 14px !important; | |
} | |
</style> | |
</head> | |
<body> | |
<!--[if IE 8]> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/ie8/0.2.5/ie8.js"></script> | |
<![endif]--> | |
<!--[if lte IE 9]> | |
<script src="https://cdn.auth0.com/js/base64.js"></script> | |
<script src="https://cdn.auth0.com/js/es5-shim.min.js"></script> | |
<![endif]--> | |
<script src="https://cdn.auth0.com/js/lock/11.32/lock.min.js"></script> | |
<script> | |
// Decode utf8 characters properly | |
var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@')))); | |
config.extraParams = config.extraParams || {}; | |
var connection = config.connection; | |
var prompt = config.prompt; | |
var languageDictionary; | |
var language; | |
if (config.dict && config.dict.signin && config.dict.signin.title) { | |
languageDictionary = { title: config.dict.signin.title }; | |
} else if (typeof config.dict === 'string') { | |
language = config.dict; | |
} | |
var loginHint = config.extraParams.login_hint; | |
var colors = config.colors || {}; | |
// Available Lock configuration options: https://auth0.com/docs/libraries/lock/v11/configuration | |
var lock = new Auth0Lock(config.clientID, config.auth0Domain, { | |
auth: { | |
redirectUrl: config.callbackURL, | |
responseType: (config.internalOptions || {}).response_type || | |
(config.callbackOnLocationHash ? 'token' : 'code'), | |
params: config.internalOptions | |
}, | |
configurationBaseUrl: config.clientConfigurationBaseUrl, | |
overrides: { | |
__tenant: config.auth0Tenant, | |
__token_issuer: config.authorizationServer.issuer | |
}, | |
assetsUrl: config.assetsUrl, | |
allowedConnections: connection ? [connection] : null, | |
rememberLastLogin: !prompt, | |
language: language, | |
languageBaseUrl: config.languageBaseUrl, | |
languageDictionary: languageDictionary, | |
languageDictionary: { | |
usernameOrEmailInputPlaceholder: 'Codice Univoco', | |
passwordInputPlaceholder: 'Ultime cinque cifre della Carta di Credito' | |
}, | |
theme: { | |
//logo: 'YOUR LOGO HERE', | |
primaryColor: colors.primary ? colors.primary : 'green' | |
}, | |
prefill: loginHint ? { email: loginHint, username: loginHint } : null, | |
closable: false, | |
defaultADUsernameFromEmailPrefix: false | |
}); | |
lock.on("signin ready", function() { | |
updateStyle(); | |
document.querySelector('input').addEventListener("input", function() { | |
updateStyle(); | |
}); | |
}); | |
function updateStyle(){ | |
var style = document.createElement('style'); | |
if ((document.getElementById("1-email").value == null || | |
document.getElementById("1-email").value == "") && | |
(document.getElementById("1-password").value == null || | |
document.getElementById("1-password").value == "") | |
) | |
{ | |
var css = '.auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-input {font-size: 10px}' | |
} else { | |
var css = '.auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-input {font-size: 14px}' | |
} | |
var style = document.createElement('style'); | |
style.appendChild(document.createTextNode(css)); | |
document.body.appendChild(style); | |
} | |
lock.show(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment