Hi,
I am trying to use auth0-js v9.10.2 on my cordova application to use embedded login flow.
So I downloaded a sample JS application from github that uses embedded login flow. Now I am trying to integrate it with my cordova app.
This is code to login:
var webAuth = new auth0.WebAuth({
domain: AUTH0_DOMAIN,
clientID: AUTH0_CLIENT_ID,
redirectUri: AUTH0_CALLBACK_URL,
responseType: 'token id_token',
scope: 'openid'
});
function login(username, password) {
webAuth.login(
{
realm: 'Username-Password-Authentication',
username: username,
password: password
},
function(err, data) {
if (err) {
console.log(err);
alert(
'Error: ' + err.description + '. Check the console for further details.'
);
return;
}
}
);
}
I get error when I login:
Error: Origin file:// is not allowed. Behaviour used for check: WEB ORIGINS. Check the console for further details.
So I tried adding file:// to auth0 dashboard on CORS, but it still gives the same error. What can I do ?