-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login problems #16
Comments
Hey, I not able to reproduce this error with the code that you have written here. Can give me more details about this ? Thanks |
Hi @criroselli , sorry for delay. I`m have a Auth service register as folow:
And in my controller, when click in logon button.. Auth.login($scope.email, $scope.senha)
.then(function (wasSuccess) {
if (wasSuccess) {
$state.go('user.home', {});
} else {
$mdToast.show(
$mdToast.simple()
.content('Error when try to logon.').position('top right')
);
}
}).catch(function (err) {
$mdToast.show(
$mdToast.simple()
.content(err.responseText).position('top right')
);
}).done(function () { the login function is .. login: function (email, password) {
if (user.isLogged()) {
this.logout();
}
user = new Stamplay.User().Model;
return user.login(email, password).then(function () {
return user.currentUser().then(function () {
var givenRole = user.get('givenRole'); // THIS IS UNDEFINED
// Most cases, emailVerified property in Stamplay are true, but here return false ?
var emailVerified = user.get('emailVerified');
if (!emailVerified) {
console.error(email, ' was not verified');
return false;
}
return user.isLogged();
});
});
},
Just for the records.. the Right now I'm adding a angular-stamplay, maybe this resolves the problem. |
I build a demo app on github, maybe it can help to understand. This is a simple app, to made a login with Username> My current email address |
One problem I've noticed is that What did I do to solve this problem (issue 1) was soon after login, save the user information.
|
On some occasions the sdk returns false for emailConfirmed, even though I have already been confirmed.
In editor is correct!
The text was updated successfully, but these errors were encountered: