Questions tagged [firebase-authentication]

1

votes
0

answer
13

Views

Function does not exist on type '() => any'. ts(2339) IONIC4, ANGULAR, FIREBASEAUTH

I am trying to link Firebase Authentication to the Firestore Lists in order to add an additional field for users of my app but my function updateUserData function on my login page gives me this error 'Property 'updateUserData' does not exist on type '() => any'.ts(2339)' //Login function from login...
genius876
1

votes
1

answer
40

Views

Trying to Login using web login page that is supported by firebase, then redirect to a home page

I am having trouble trying to login and redirect my website login page using firebase. I want to sign in using saved email address and password on my firebase realtime database. I use Go To Console>Authentication>Users>Add Users, after saving I go to my login page then type the email address and pas...
Lancer EX
0

votes
0

answer
5

Views

Firebase logging in with SMS - how user log in again?

Usually a user will log in to a website with a user name and a password. I implemented an SMS log in with Firebase, so a new user is created. My question is - how the user will log in again later ? every time he visit the website he must enter his phone and get a new code ? or is it something I have...
Curnelious
0

votes
0

answer
6

Views

Firebase Auth - After updating the user's email, Firebase Auth logs out the user

I am using Firebase Auth in my app. I update the email like follows: firebaseAuth.currentUser?.updateEmail(email) The email is updating 100% (I do a re-auth when necessary as well). My problem is after the e-mail has changed, the user is being logged out of his account and has to login again. When...
Nico Bos
1

votes
1

answer
15

Views

firebase.auth.RecaptchaVerifier is not a constructor error

Trying to add the Firebase script in my html, after initializing Firebase app with firebase.initializeApp(config);. So then I have this : window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('sign-in-button', { 'size': 'invisible', 'callback': function(response) { // reCAPTCHA solved, all...
Curnelious
7

votes
2

answer
127

Views

Firebase Auth - A network error (such as timeout, interrupted connection or unreachable host) has occurred

Update My app is continuously getting this crash in live app. There are 100-200 crash per week. So I am starting a bounty on this question. If someone have solved it. Please help. However 99% users are crash free. These crashes may be effecting my app's repo on play-store. so if I don't get solutio...
Khemraj
0

votes
0

answer
3

Views

Why does my firebase Google Auth popup close immediately?

I'm following this tutorial to learn firebase. I cloned the repo. At step 7, I did what it said (though, actually, there was nothing to do here because the steps were already completed in the repo). When I click the [SIGN-IN WITH GOOGLE] button in the UI, the auth window pops open and closes imme...
Sir Robert
1

votes
1

answer
458

Views

Firebase database secure without firebase auth

I have an app published on the play store, I want to implement firebase in the app. I have read all the documentation and I have two doubts: If someone use apk decompiler with my app and get the googleservices.json, they can do whatever they want with the database? It is possible that my database is...
Martin De Simone
1

votes
2

answer
303

Views

Firebase Phone Authentication pops up a reCAPTCHA verification window on iOS even if Background Modes and Push Notifications are enabled.

I'm implemented Phone Authentication with Firebase on iOS. Authentication works. However, on iOS, a reCAPTCHA window pops up. I tried to enable Silent Notifications by enabling Background Modes and Push Notifications. It is skipping the reCAPTCHA test but it still pops up a blank page with a loading...
Berkay Atatop
1

votes
1

answer
145

Views

Prevent user account creation with sign in by email in firestore

I have setup a passwordless login using firebase sign in with email link. Everything is working as expected, however when the user receives the email and clicks the link to login they are automatically created as a registered user. https://firebase.google.com/docs/auth/web/email-link-auth After a us...
arkade
1

votes
1

answer
32

Views

Check if user logged in from backend Firebase Authentication

In my frontend, the user logs in using Firebase Authentication Browser. That part works perfectly fine. In addition to Firebase backend, I also have NodeJS backend that serves additional content. However, I need to serve the content to only Authenticated user. My question is: Is there a way for my...
TSR
0

votes
1

answer
17

Views

I am having adapter problem. Can anyone know the solution [duplicate]

This question already has an answer here: Firebase:Recycler view No Adater attached , Skipping Layout 3 answers Can anybody help me to sort out this problem? I looked similar question posted by other learner, still I am not able to solve my problem. When the app runs, the activity displays only whi...
susmita rai
0

votes
2

answer
19

Views

FirebaseUser currentUser is showing array

When I debug currentUser it is shwoing value: {[email protected]}, why it is showing in array, but I've registered only single user. mAuth = FirebaseAuth.getInstance(); currentUser = mAuth.getCurrentUser(); @Override public void onStart() { super.onStart(); if (currentUser != null) { databaseReference.child(...
Pooja Singh
1

votes
0

answer
9

Views

Firebase stored data with ${res.user.uid} instead of userid

Firebase stored data with ${res.user.uid} instead of userid .Please advise solution how to store user with userid try{ const res= await this.afAuth.auth.createUserWithEmailAndPassword(username,password) this.afstore.doc('users/${res.user.uid}').set({ username }) this.user.setUser({ username, uid:res...
2

votes
1

answer
25

Views

Angular Firebase: Accessing field maps for authentication

I have a firebase collections of users > document id > uid, ..., and roles { admin: boolean, moderator: boolean, client: boolean }. My authentication process works correctly with the guards redirecting as needed. More importantly I am display 90% of the data in applicable components within my users...
Navraj Bains
1

votes
1

answer
747

Views

Is a full sign-in required to verify a phone number using Firebase Phone Auth?

A question about firebase auth for authentication via phone number. I was wondering if it was possible to link a 'Phone Provider' to say a Google Auth Provider. There is no explicit mention of it in the docs. The thing that had me scratching my head is - the Link Multiple Auth Provider docs talk a...
Elrondy
1

votes
2

answer
566

Views

Firebase check email exist (fetchProvidersForEmail alternative)

the fetchProvidersForEmail method is deprecated. But on the firebase site i dont find an alternative, so i have to ask you. Hope you can help. I want to Check if email is not already in the database, here is the old code for that. Auth.fetchProvidersForEmail(Email.getText().toString()).addOnComplet...
Tim272793
1

votes
1

answer
200

Views

Firebase - In security rules how do I restrict a user to only update an object that they originally created?

Firebase - In security rules how do I restrict a user to only update an object that they originally created. So they cannot update another persons object? Current security rules: { 'rules': { 'organisations': { '$uid': { '.read': '$uid === auth.uid', '.write': '$uid === auth.uid' } } } } Thi...
AngularM
1

votes
1

answer
3.7k

Views

How can I generate a JWT token for use with the Firebase REST API? [duplicate]

This question already has an answer here: Using Custom Tokens to make REST requests to FB DB as an admin 2 answers I would like to authorize an user in firebase. I am using a poor JavaScript so I must generate a JWT token on my own but I don't know where put a username and password before create to...
Grajek
1

votes
2

answer
840

Views

how to subscribe to firebase login events with angularfire2

I saw this example for how to subscribe to firebase auth events this.firebase.onAuth((user) => {}) How can I do the same thing with angularfire2 and ionic2 and angular2 project? constructor(nav:NavController, private auth: FirebaseAuth) { auth.onAuth ... // I don't see any subscription events on the...
MonkeyBonkey
1

votes
2

answer
615

Views

Firebase create user swift doesn't work

below I just typed is error showing 'Cannot cover value of type '(,) -> Void' to expected argument type '(NSERROR!) -> Void!)' on this line of code: what would be wrong? FIREBASE_REF.createUser(email, password: password, withCompletionBlock: {(error,authData) -> Void in @IBAction func creatAccountAc...
elciann
1

votes
1

answer
1.7k

Views

Get error Changing a user's email/password in Firebase 3 for Android

I'm looking to catch the errors of the new methods to change email and password for Android, but I can't seem to find anything. Can somebody point me in the right direction? The official documentation is not clear about this. FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser(); String ne...
1

votes
1

answer
450

Views

User keeps login even if I delete the account

I'm make an app with a Firebase Auth, but when I delete or when I disable an account I need make a signOut() manually (I control this with a user reload), if I don't, the user can keep uploading data. How I can fix this without the app code? Firebase rules { 'rules': { 'users': { '$uid': { '.read':...
AitorDB
1

votes
2

answer
1.6k

Views

How to use FIRApp.createUserWithEmail in specific database reference?

Iv been converting my post Firebase 2 codebase to Firebase 3 and having some troubles. So basically Im trying to figure out how I create a new user at a specific location on my Firebase DB. Goal - I want to save all new users @ var _USER_REF = FIRDatabaseReference().child('\(BASE_URL)/users') Here i...
brkr
1

votes
1

answer
655

Views

Can custom auth properties be implemented and used with security security rules in Firebase 3?

The legacy Firebase documentation indicates that you can insert properties into the auth object that is used in database security rules. Indeed I had this approach working quite nicely in my app before I upgraded to version 3. 'Any values passed into createToken() are appended onto the auth variabl...
Andrew
1

votes
1

answer
2.3k

Views

Firebase authenticate with backend server [duplicate]

This question already has an answer here: Is it still possible to do server side verification of tokens in Firebase 3? 2 answers My Android app currently uses Google sign in and this works well. I add the tokenId to every server request and then verify it on the server. This was very easy to implem...
Muted
1

votes
1

answer
426

Views

Can't get email from authenticated user with Facebook

I am using Firebase's Facebook Login to authenticate my users. I had to upgrade my project to Firebase 3.x thus I had to change this bit. I achieved getting 'fullname' with user!.displayName and 'photoUrl' with user!.photoUrlfor example; but cannot access email with user!.email even though 'email' s...
senty
1

votes
1

answer
1k

Views

Invalid credentials error in Angularfire2 oauth login

I'm trying to login to my Ionic 2 app using Facebook native and Angularfire2 (2.0.0-beta.2), but even though I am successfully getting an access token, no matter how I try to pass it in to angularfire's auth.login function it still throws an invalid credentials error. Here is my config: firebaseAuth...
Cameron637
1

votes
1

answer
538

Views

On Auth State changed AngularFire

Trying to authenticate an user using firebase. Started my app using firebase 2.xx but even after upgrading to Firebase 3.xx, throwing error 'onAuthStateChanged is not a function'. This is how my login function looks like- .controller('HomeCtrl', ['$scope','$location','CommonProp','$firebaseAuth', '$...
Suraj A J
1

votes
1

answer
1.2k

Views

Firebase - how to grant permission to super user for read and write

How can i grant super user to certain user in firebase real time database to read others users data e.g. (This is for authenticated users only, no one else is allowed to read or write) { 'rules': { 'users': { '$uid': { '.read': '$uid === auth.uid', '.write': '$uid === auth.uid', } } } }
Ally Makongo
1

votes
2

answer
435

Views

Firebase Android C++ app crash on start

I would like to use Firebase authentication. On gradle, I've put this: dependencies { compile 'com.google.firebase:firebase-auth:9.2.0' } When the app start, simply crashes. If doesn't put the compile firebase dependencie, the application starts. How can view what is happen?
mabg
1

votes
1

answer
368

Views

Firebase iOS: createUserWithEmail isn't generating userId (uid)

I am new to firebase and I'm trying to learn how to create users. My problem is that when i use the createUserWithEmail completion block via a button, for some reason the unique identifier, the uid, is not generated. This prevents me from storing the associated username and password under the uid in...
pho_pho
1

votes
1

answer
1.4k

Views

Firebase Crash Reporting : FirebaseApp with name [DEFAULT] doesn't exist

This an exception I encountered when trying to use FirebaseAuth and Firebase Crash Reporting. I am trying to sign in anonymously in my application onCreate public class MainApplication extends Application { @Override public void onCreate() { super.onCreate(); FirebaseAuth firebaseAuth = FirebaseAuth...
Eoin
1

votes
2

answer
506

Views

Can't change variable from within firebase.auth().signInWithPopup(provider) function

So I have defined a variable called testVariable and set it to initial inside of the $scope.signIn() function. Then inside the firebase.auth().signInWithPopup(provider).then() function I changed it to changed. When I console.log() outside the firebase.auth().signInWithPopup(provider).then() function...
WebGavDev
1

votes
1

answer
636

Views

How to check if the session is expired in Firebase

I'm new to swift and Firebase, I'm trying to create an app with email login, I noticed that if the user didn't sign out before closing the application, the value FIRAuth.auth().currentUser.uid is seen as not nil in the second time to run the application my questions: does the session expire in fireb...
Maha Daoud
1

votes
1

answer
259

Views

Is there a way in firebase to get if email is verified?

For now I'm doing like this: firebase.auth().onAuthStateChanged((user) => { if (!user.emailVerified) { //Something } }); But, the problem is I have added this block of code in multiple pages and whenever the authentication changed (user logged in or logged out) It calls all those functions and that...
1

votes
1

answer
1.6k

Views

FirebaseApp with name [DEFAULT] doesn't exist ; Firebase Token Verification

in order to verify a Firebase token sent from a client app i have the following code: Task authTask = FirebaseAuth.getInstance().verifyIdToken('very long string token').addOnSuccessListener(new OnSuccessListener() { @Override public void onSuccess(Object tr) { } }).addOnFailureListener(new OnFailure...
EhsanR
1

votes
1

answer
2.4k

Views

Firebase - Uncaught (in promise) TypeError: Cannot read property

I've got 2 text boxes, one for username and the other for password. Here is the firebase code: function authenticateUser() { var username = document.getElementById('username').value; var password = document.getElementById('password').value; database.ref('users/'+username).once('value').then(function...
1

votes
2

answer
514

Views

$authWithPassword is not a function in AngularFire 2.x

I've seen posts about this problem before, but they're either outdated or offer a solution very similar to my setup. Basically, I have two functions in my controller: authCtrl.login and authCtrl.register. The register's call to Auth.$createUserWithEmailAndPassword() works fine, but the login's call...
GHOST-34
1

votes
1

answer
239

Views

How to call Firebase JS method using AngularFire

I am using AngularFire (Interfacing library between Firebase and AngularJS). I would like to call the javascript method sendEmailVerification() in my angular code. When I implement the below code, I get an error saying that: $scope.authObj.sendEmailVerification is not a function. which is probably b...
kurrodu

View additional questions