drupal-ionic icon indicating copy to clipboard operation
drupal-ionic copied to clipboard

Getting an error when trying to register and login

Open fusionx1 opened this issue 10 years ago • 4 comments

Hi Kevin thanks for sharing your apps. This is really awesome, it triggers my appreciation for ionic. I just wanna share this error i got when trying to configure my own endpoint url. I attached here a screenshot, i hope you can help me with it. I also would like to contribute to this project.

screen shot 2015-06-28 at 1 07 40 am

Thanks,

Paul de Paula

fusionx1 avatar Jun 27 '15 17:06 fusionx1

i have checked the error on drupal side and i saw this:

screen shot 2015-06-28 at 1 25 11 am

It seems that it sends an undefined data which supposed to be a username and password.

fusionx1 avatar Jun 27 '15 17:06 fusionx1

Same problem here. Try this: In login.html, line 9, change doLogin() to doLogin(username, password) In controllers.js, line 37, change $scope.doLogin = function() { to $scope.doLogin = function(username, password) { and line 43 change Account.login($scope.username, $scope.password).then(function(data){ to Account.login(username, password).then(function(data){

UnbekanntesPferd avatar Jul 10 '15 07:07 UnbekanntesPferd

If Drupal Services is set to use the v1.1 API, then you'll also need to change line 35 of services.js to

data          : 'name=' + encodeURIComponent(username) + '&pass=' + encodeURIComponent(password),

also the username and password should be url encoded.

martinjbaker avatar Oct 06 '15 16:10 martinjbaker

Hello after the above correction, I managed to login to the site but the register process still fails. Can you please help?

ghost avatar Apr 09 '16 18:04 ghost