CINXE.COM

Sign In with Auth0

<!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" /> </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/12.4/lock.min.js"></script> <script> // Decode utf8 characters properly var config = JSON.parse(decodeURIComponent(escape(window.atob('eyJpY29uIjoiaHR0cHM6Ly93d3cucmFnYW4uY29tL3dwLWNvbnRlbnQvdGhlbWVzL3JhZ2FuLXRoZW1lL2ltZy9yYWdhbl9sb2dvLnN2ZyIsImFzc2V0c1VybCI6IiIsImF1dGgwRG9tYWluIjoibG9naW4ucmFnYW4uY29tIiwiYXV0aDBUZW5hbnQiOiJkZXYtcmFnYW4iLCJjbGllbnRDb25maWd1cmF0aW9uQmFzZVVybCI6Imh0dHBzOi8vbG9naW4ucmFnYW4uY29tLyIsImNhbGxiYWNrT25Mb2NhdGlvbkhhc2giOmZhbHNlLCJjYWxsYmFja1VSTCI6Imh0dHBzOi8vd3d3LnJhZ2FuLmNvbS9pbmRleC5waHA/YXV0aDA9MSIsImNkbiI6Imh0dHBzOi8vY2RuLmF1dGgwLmNvbS8iLCJjbGllbnRJRCI6IjJlbTA0anBPRzJrV2xaOW5Rdkxvemp0bnlRWWxocExKIiwiZGljdCI6eyJzaWduaW4iOnsidGl0bGUiOiJNeSBBY2NvdW50IExvZ2luIn19LCJleHRyYVBhcmFtcyI6eyJwcm90b2NvbCI6Im9hdXRoMiIsInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJub25jZSI6ImY2MWY5NTdlMWM0MzBhZTI4NzcwNjk5Zjh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NMYmJKZ1RvIiwiX2ludHN0YXRlIjoiZGVwcmVjYXRlZCIsInN0YXRlIjoiaEtGbzJTQklSVk5TUTBWQ1dscGFWbHBhTkhRNWVFWm9iV1ZXYUdaRFEwbHdUVGRSYnFGdXBXeHZaMmx1bzNScFpOa2daR3BuYm5nNE1WVjNiR0phVEZKTFoxaE5jRUUwVnpnNU16QTRjbTVEWTNPalkybGsyU0F5Wlcwd05HcHdUMGN5YTFkc1dqbHVVWFpNYjNwcWRHNTVVVmxzYUhCTVNnIn0sIndpZGdldFVybCI6Imh0dHBzOi8vY2RuLmF1dGgwLmNvbS93Mi9hdXRoMC13aWRnZXQtNS4yLm1pbi5qcyIsImlzVGhpcmRQYXJ0eUNsaWVudCI6ZmFsc2UsImF1dGhvcml6YXRpb25TZXJ2ZXIiOnsidXJsIjoiaHR0cHM6Ly9sb2dpbi5yYWdhbi5jb20iLCJpc3N1ZXIiOiJodHRwczovL2xvZ2luLnJhZ2FuLmNvbS8ifSwiY29sb3JzIjp7InBhZ2VfYmFja2dyb3VuZCI6IiMwMDAwMDAiLCJwcmltYXJ5IjoiIzAwM0Q3OSJ9fQ==')))); //console.log(config); //console.log(config.extraParams); config.extraParams = config.extraParams || {}; const urlParams = new URLSearchParams(window.location.search); //console.log(urlParams.get('action')); var isSignup = urlParams.get('action') === "signup"; var connection = config.connection; var prompt = config.prompt; var languageDictionary; var language; // https://auth0.com/docs/customize/customize-lock-error-messages var DictErrors = { signUp: { "invalid_password": "Password is not valid.", "user_exists": "Email may be already register with us. Please navigate to login and password reset option." } }; if (config.dict && config.dict.signin && config.dict.signin.title) { languageDictionary = { title: config.dict.signin.title, signUpTitle: 'Register', emailInputPlaceholder: "your email", usernameInputPlaceholder: 'your email', success: {forgotPassword: "If an email is associated with your account, <br>you will receive an email allowing you to reset your password.<br>Having trouble? Contact <a href=\"mailto:cservice@ragan.com\" style=\"color:#fff; text-decoration: underline;\">cservice@ragan.com</a> or 1-800-878-5331"}, error: DictErrors }; } else if (typeof config.dict === 'string') { language = config.dict; } console.log(languageDictionary); var loginHint = config.extraParams.login_hint; var colors = config.colors || {}; // Available Lock configuration options: https://auth0.com/docs/libraries/lock/lock-configuration // AUTH0 Limit for additionalSignUpFields is 10!!! var lock = new Auth0Lock(config.clientID, config.auth0Domain, { auth: { redirectUrl: config.callbackURL, responseType: (config.internalOptions || {}).response_type || (config.callbackOnLocationHash ? 'token' : 'code'), params: config.internalOptions }, initialScreen: isSignup ? "signUp" : "login", configurationBaseUrl: config.clientConfigurationBaseUrl, overrides: { __tenant: config.auth0Tenant, __token_issuer: config.authorizationServer.issuer }, assetsUrl: config.assetsUrl, allowedConnections: connection ? [connection] : null, defaultDatabaseConnection: 'CustomDatabaseConnection-OmedaAPI', // keeping this as defualt but on login it should be cutsom database connectionResolver: function (username, context, cb) { console.log(context); if (document.getElementById("1-first_name")) {console.log('First Name'); console.log(document.getElementById("1-first_name").value);} // var domain = username.indexOf('@') !== -1 && username.split('@')[1]; if (document.getElementById("1-first_name")) { // if this field is present then it is sign up form so use regular database else is login so use custom to transfer accounts from Omeda // If the username is test@auth0.com, the connection used will be the `auth0-users` connection. cb({ type: 'database', name: 'CustomDatabaseConnection-OmedaAPI' }); } else { // Use the default approach to figure it out the connection // Username-Password-Authentication not in use anymore cb({ type: 'database', name: 'CustomDatabaseConnection-OmedaAPI' }); } }, /* defaultDatabaseConnection: isSignup ? 'Username-Password-Authentication' : 'CustomDatabaseConnection-OmedaAPI', connectionResolver: function () { console.log('isSignup'); console.log(isSignup); if (isSignup) return {type: 'database', name: 'Username-Password-Authentication'}; else return {type: 'database', name: 'CustomDatabaseConnection-OmedaAPI'}; },*/ rememberLastLogin: !prompt, language: language, languageBaseUrl: config.languageBaseUrl, languageDictionary: languageDictionary, theme: { logo: config.icon ? config.icon : 'https://cdn.auth0.com/styleguide/components/1.0.8/media/logos/img/badge.png', primaryColor: colors.primary ? colors.primary : 'green' }, prefill: loginHint ? { email: loginHint, username: loginHint } : null, closable: false, defaultADUsernameFromEmailPrefix: false, additionalSignUpFields: [ { name: "first_name", placeholder: "First Name", validator: function(first_name) { return { valid: first_name.length >= 2, hint: "Please enter your First Name" // optional }; } }, { name: "last_name", placeholder: "Last Name", validator: function(last_name) { return { valid: last_name.length >= 2, hint: "Please enter your Last Name" // optional }; } }, { name: "job_title", placeholder: "Title", validator: function(job_title) { return { valid: job_title.length >= 2, hint: "Please enter your Last Name" // optional }; } }, { name: "company", placeholder: "Company/Organization", validator: function(company) { return { valid: company.length >= 2, hint: "Please enter company or organization name" // optional }; } }, { type: "select", name: "company_type", placeholder: "Company Type", options: [ {value: "Agency", label: "Agency"}, {value: "Corporation", label: "Corporation"}, {value: "Government", label: "Government"}, {value: "Healthcare", label: "Healthcare"}, {value: "Insurance", label: "Insurance"}, {value: "Education", label: "Education"}, {value: "Nonprofit", label: "Nonprofit"}, {value: "Supplier/Vendor", label: "Supplier/Vendor"}, {value: "Other", label: "Other"}, {value: "None of the Above", label: "None of the Above"}, ] }, { type: "select", name: "audience", placeholder: "Audience", options: [ {value: "B2B", label: "B2B"}, {value: "B2C", label: "B2C"}, {value: "Both", label: "Both"}, ] }, { type: "select", name: "number_of_employees", placeholder: "Number Of Employees", options: [ {value: "Less than 50", label: "Less than 50"}, {value: "50-99", label: "50-99"}, {value: "100-249", label: "100-249"}, {value: "250-499", label: "250-499"}, {value: "500-999", label: "500-999"}, {value: "1000-5000", label: "1000-5000"}, {value: "5000-10000", label: "5000-10000"}, {value: "10000 and over", label: "10000 and over"}, ] }, { name: "phone", placeholder: "Work Phone Number", // The following properties are optional validator: function(phone) { return { valid: phone.length >= 9, hint: "Must have 9 or more chars" // optional }; } } ] }); if(colors.page_background) { var css = '.auth0-lock.auth0-lock .auth0-lock-overlay { background: ' + colors.page_background + '; background-image: url("https://s39939.pcdn.co/wp-content/uploads/2024/01/LoginBackgroundImage.jpg"); background-repeat: no-repeat; background-size: cover;' + ' }' + '.auth0-lock.auth0-lock .auth0-lock-widget {'+ ' width: 500px; max-width: 90%;' + '}' + '.auth0-lock-header-bg.auth0-lock-blur-support {' + ' background: #fff !important; background-color: #fff !important;' + '}' + '.auth0-lock-header-bg.auth0-lock-blur-support .auth0-lock-header-bg-blur {'+ ' background-image: none !important;'+ '}'; var style = document.createElement('style'); style.appendChild(document.createTextNode(css)); document.body.appendChild(style); } lock.show(); // fix for username field to be shown as email // callback executed when canvas was found function handleCanvas(usernameicon) { usernameicon.innerHTML='<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="32px" transform="translate(-2155.000000, -2317.000000)" fill="#373A39"><g id="Group-856" transform="translate(1.000000, 1.000000)"><path id="Fill-419" d="M2184,2339 C2184,2339.55 2183.55,2340 2183,2340 L2157,2340 C2156.45,2340 2156,2339.55 2156,2339 L2156,2319 C2156,2318.45 2156.45,2318 2157,2318 L2183,2318 C2183.55,2318 2184,2318.45 2184,2319 L2184,2339 L2184,2339 Z M2184,2316 L2156,2316 C2154.89,2316 2154,2316.89 2154,2318 L2154,2340 C2154,2341.1 2154.89,2342 2156,2342 L2184,2342 C2185.1,2342 2186,2341.1 2186,2340 L2186,2318 C2186,2316.89 2185.1,2316 2184,2316 L2184,2316 Z M2176,2322 L2180,2322 L2180,2326 L2176,2326 L2176,2322 Z M2174,2328 L2182,2328 L2182,2320 L2174,2320 L2174,2328 Z M2158,2332 L2172,2332 L2172,2330 L2158,2330 L2158,2332 Z M2158,2336 L2172,2336 L2172,2334 L2158,2334 L2158,2336 Z"></path></g></g></g>'; usernameicon.setAttribute('viewBox', '0 0 32 26'); } // set up the mutation observer var observer = new MutationObserver(function (mutations, me) { // `mutations` is an array of mutations that occurred // `me` is the MutationObserver instance if (document.querySelector('.auth0-lock-input-username')) { var usernameicon = document.querySelector('.auth0-lock-input-username').querySelector('div').querySelector('svg'); handleCanvas(usernameicon); me.disconnect(); // stop observing return; } }); // start observing observer.observe(document, { childList: true, subtree: true }); </script> <style> /*Fix for mobile*/ @media screen and (max-width: 480px) { form.auth0-lock-widget { min-width: 100%; } } </style> </body> </html>