angularjs - angularFireAuth does not work with google -
i seek utilize firebase angularjs authenticate users. works fine except google. (classic, facebook , twitter works great).
this sample of code :
i seek understand problem displaying error in console :
angularfireauth.login(provider, { email: useremail, password: userpassword }).then(function(user) { //success }, function(error) { //error console.error('login failed: ', error); });the error object contains message: "invalid jwt"
i searched web did not find explanation error.
one of enlighten me?
in advance, give thanks you.
assuming ok google app , angularfireauth
is:
$scope.angularfireauth = $firebasesimplelogin(<your_firebase_ref>);
(you read more angularjs login on here)
you should seek this:
$scope.angularfireauth.$login(provider) // code missing '$' before login. .then(function(user) { //success }, function(error) { //error console.error('login failed: ', error); });
you don't need utilize email
nor password
due you're trying log in google not email
i hope helps you.
angularjs firebase angularfire
No comments:
Post a Comment