I want to login in my Site Drupal 8.2.3 from another application using Ajax, but is returning error all the time.
$.ajax({
url : "http://localhost/Drupal-tuto-test/user/login",
type : 'POST',
data: {
'username' : 'admin',
'password' : 'admin'
},
dataType : 'json',
error : function(data) {
console.log('Error ',data);
},
success : function(data) {
console.log('Success ',data);
}
});