Cross origin with login credentials is not working

I kind of new on Auth0 and I trying to use the Auth0 sdk in my web page for log in Auth0, however I getting the error:

“Access to XMLHttpRequest at ‘’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

third party is enable and I using chrome
here is my code:

		window.addEventListener('load', function () {
		var params ={
			domain: '<%= domain %>',
			clientID: '<%= clientId %>',
			clientSecret: '<%= clientSecret %>',
			responseType: 'code',
			redirectUri: '<%= redirectUri %>',
			state: '<%= state %>'
		var webAuth = new auth0.WebAuth(params);
		var databaseConnection = 'Username-Password-Authentication';
		function login(e) {
			var username = document.getElementById('email').value;
			var password = document.getElementById('password').value;
				realm: databaseConnection,
				username: username,
				password: password,
				state: '<%= state %>'
			}, function (err) {
				if (err) displayError(err);
		document.getElementById('btn-login').addEventListener('click', login);

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?