Closed jgoliveira closed 10 years ago
Hi,
The AngularJS module will automatically take care of redirection after it has authorized against the UserApp API. So you don't need to call your own back-end for this, or do the redirect.
You can read more about it here: https://github.com/userapp-io/userapp-angular#back-end
If you have any further questions, I'm happy to answer them.
Best, Timothy
What do you mean? I have a mongo database with my users, running on my server, so I need to do ajax requests to confirm a valid user to login. So I don't understand... Em 30/06/2014 20:11, "Timothy E. Johansson" notifications@github.com escreveu:
Hi,
The AngularJS module will automatically take care of redirection after it has authorized against the UserApp API. So you don't need to call your own back-end for this, or do the redirect.
You can read more about it here: https://github.com/userapp-io/userapp-angular#back-end
If you have any further questions, I'm happy to answer them.
Best, Timothy
— Reply to this email directly or view it on GitHub https://github.com/userapp-io/userapp-angular/issues/9#issuecomment-47573373 .
This module are using UserApp for authentication, so you won't need to take care of that. If you still want to handle your own users, and just use this module, you would have to modify it to call your API instead of UserApp.
Let me know if you have any other questions.
Timothy
Yeah, I need to have the users on my own database... Can you enlight me in how to do it?
Em Ter, 1 de Jul, 2014 às 7:00, Timothy E. Johansson notifications@github.com escreveu:
This module are using UserApp for authentication, so you won't need to take care of that. If you still want to handle your own users, and just use this module, you would have to modify it to call your API instead of UserApp.
Let me know if you have any other questions.
Timothy
— Reply to this email directly or view it on GitHub.
Okay, so I guess you just want this module without using UserApp? Unfortunately I can't help you too much of that, more than point you in the right direction.
So, since this is open-source, you can just fork this repo to do the changes you need. Then open angularjs.userapp.js and replace all code beginning with UserApp.
and call your own API instead.
For example, UserApp.User.login()
on line 460 should be replaces with a login call to your server. You would of course need to handle the response differently, and you may need to manage the token differently than UserApp too.
Hi there, I'm a freshman to angular and I need your help to make this work. I made it through the tutorial at codeacademy, and using this page also, and I don't understand what's wrong. I have my app on an url like this: http://localhost/myapp/www/#/ Which also is my login page, when I click my login button (which is a span with an onclick function), I see that my server is receiving the get request for login, but the browser redirects for the same page. It's supose to go to http://localhost/myapp/www/#/home Don't know what I'm doing wrong, can you help me?
EDIT: Forgot to say that my login function does a ajax post request to my server, and when it succeds, I'm doing this: var scope = angular.element('#IDofMyDiv').scope() scope.$apply(function(){ scope.changeView('home'); });
And in the file app.js, I have this function: function btnCtrl ($scope,$location) { $scope.changeView = function(view){ $location.path(view); }; }
It's ok to do that, right?