# Category: firebase-authentication

I have read the document in AngularFire 1 about Authentication. However, I cannot find out how to check whether the current user is anonymous. Here is what I tried .controller(‘IndexCtrl’,[‘$scope’,’$route’,’Auth’, function($scope,$route,Auth){ //Check whether user is existent $scope.isExistent = function(){ var isIt = true; if(firebaseUser.isAnonymous()){ isIt = false; console.log(“is anonyous”); } return isIt; }; }]); Any help would be appreciated. Source: AngularJS ## Cordova/Ionic Firebase Auth Persistent Login This issue is for an app built with Ionic/Cordova/Firebase. Android and IOS devices randomly wipes out localstorage. Whenever this happens, users of the app are asked to login once more. Authentication is done with: https://firebase.google.com/docs/auth/web/password-auth How can I resolve this issue? Source: AngularJS ## AngularFireAuth2 idToken null how to AngularFireAuth2 idToken null I’m trying to get the idToken from firebase using the code from here, specifically: firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idToken) { // Send token to your backend via HTTPS // … }).catch(function(error) { // Handle error }); However, when I try to return the value of the idToken, it is undefined. I would appreciate any help with this. Thanks. EDIT: Some more details. This is what I’m trying to do, right after […] ## Angular$http/\$q how to block promise until modal response it resolved?

I have an input that makes a request(google phone auth), sends the user the code then I want to prompt a modal so the user can input the code(wait for modal input), and then return confirmation code to finish the call. The problem right now is that the modal shows and the call continues. Any help/ideas appreciated. I’ve tried by with both of these below methods. single deferred: this.signInWithMobile = function(phoneNumber, appVerifier) { var deferred […]

## Firebase – Keep user signed in when redirecting to different page

I have 2 components to my website: The landing page with a sign up form (https://example.com) The single page anuglarjs application (https://app.example.com) What I want to achieve is when the users comes to the landing page, they are able to sign up using Firebase, and once the sign up is complete, redirect the user to the single page application and automatically be signed in, so they don’t have to enter their information again. Here is […]

## Authentication angularfire2 and Routes

I’m a beginner angular programmer, I’m doing an app with authentication with social network (Facebook & Google). in the logincomponent.ts indicates me an error, at the part “signInWithFacebook() “this.firebaseAuth.signInWithFacebook()” Property ‘signInWithFacebook’ does not exist on type ‘AngularFireAuth’. and the “this.router.navigate([‘dashboard’])” Property ‘router’ does not exist on type ‘AuthService’.any. I show the codes for if anybody helps me. Thanks for your comments. auth.service.ts import { Injectable } from ‘@angular/core’; import { Router } from ‘@angular/router’; import […]