Giter Club home page Giter Club logo

mean-auth's People

Contributors

lucaslin avatar mjhea0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mean-auth's Issues

Edge Error with Authentication

So on Firefox and chrome the authentication works and once logged in it saves you until you logout

on Edge when i try to log in it just brings me constantly back to login so im guessing the problem is with the following section

AuthService.getUserStatus()
.then(function(user)
{`
.......

}

AngularJS error message

Hi Michael, thank you for this great tutorial. It works as expected except for one bit.

I have changed the restricted to false for the home page to make it available to all users. When I point the browser to localhost:3000, it takes me to the home page and I'm able to view it, but it's displaying an error message in the console. I've tried it on both Firefox and Chrome, but it's the same problem; for some reason it seems that it's not recognizing next.access

Chrome message:

TypeError: Cannot read property 'restricted' of undefined
    at main.js:58

Firefox message:

Error: next.access is undefined
@http://localhost:3000/main.js:58:1

Referring to this line of code:
if (next.access.restricted && !AuthService.isLoggedIn())

in this snippet of code in main.js file:

myApp.run(function ($rootScope, $location, $route, AuthService) {
  $rootScope.$on('$routeChangeStart', function (event, next, current) {

    AuthService
      .getUserStatus()
      .then(function () {
        if (next.access.restricted && !AuthService.isLoggedIn()) {
          $location.path('/login');
          $route.reload();
        }
      });
  });
});

Get function

I have modified this program.
i want to get all users who logged in and to display that users in html page.

In service.js
i have used

  function register(username, password ,firstname) {
		  $http.get('/user/register')
	       .success(function(data) {
            
	  $scope.users = data;
		
           console.log(data); 
		    })
			.error(function(data) {
		     console.log('Error: ' + data);
		   });

error is coming like

Error: $scope is undefined
register/<@http://localhost:3000/services.js:101:4
m/h.success/<@http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min.js:87:164
f/<@http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min.js:119:221
$eval@http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min.js:133:442
$digest@http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min.js:131:33
$apply@http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min.js:134:234
g@http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min.js:88:1
R@http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min.js:92:116
Zf/</v.onload@http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.min.js:93:155

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.