<script src="https://cdn.auth0.com/js/lock/11.x.x/lock.min.js"></script><script src="https://cdn.auth0.com/js/auth0/9.x/auth0.min.js"></script><script src="https://cdn.auth0.com/js/polyfills/1.0/object-assign.min.js"></script><script> var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@')))); var lock = new Auth0Lock(config.clientID, config.auth0Domain, { //...additional configuration }); function handleError(err) { // add proper error handling console.log(err); }; var params = Object.assign({ scope: config.internalOptions.scope, _csrf: config.internalOptions._csrf, state: config.internalOptions.state, }, { /* additional configuration needed for use of custom domains overrides: { __tenant: config.auth0Tenant, __token_issuer: '{yourCustomDomain}' }, */ domain: config.auth0Domain, clientID: config.clientID, redirectUri: config.callbackURL, responseType: 'code' }); var webAuth = new auth0.WebAuth(params); /* * Verify if Kerberos is possible, if it is, try to authenticate the user. * * the response from getSSOData will only have a connection and strategy if * the IP address is within the Kerberos range in the connection's settings */ webAuth.client.getSSOData(true, function(err, data) { if (err) handleError(err); if (data.connection && data.strategy === 'ad') { webAuth.authorize({connection: data.connection}, function(err) { if (err) handleError(err); }); } else { lock.show(); } });</script>