firebase-authentication

angularfire 2: Error “Unhandled Promise rejection: TypeError: Cannot read property”

吃可爱长大的小学妹 提交于 2019-12-05 21:25:54
I tried an example app to connect to Firebase In my Main.ts I wrote this: import { bootstrap } from '@angular/platform-browser-dynamic'; import { enableProdMode } from '@angular/core'; import { AppComponent, environment } from './app/'; import { FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthProviders, AuthMethods } from 'angularfire2'; if (environment.production) { enableProdMode(); } bootstrap(AppComponent,[ FIREBASE_PROVIDERS, defaultFirebase({ apiKey: "MYKEY", authDomain: "MYDOMAIN.firebaseapp.com", databaseURL: "https://MYDOMAN.firebaseio.com", storageBucket: "MYDOMAIN

How to get UserName from FirebaseUser using authentication Uid in android?

て烟熏妆下的殇ゞ 提交于 2019-12-05 21:14:58
I registered a user by using createUserWithEmailAndPassword() and login using signInWithEmailAndPassword() methods. Now when I login a user I need to get the username, mobile, that are stored in the user node. I could get the UId for each user, by using this how it possible to get the mentioned information in android? all you have to do is use UserProfileChangeRequest mAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if(task.isSuccessful()){ // Sign in

Firebase Auth Ui Google Sign In “Developer Error”

醉酒当歌 提交于 2019-12-05 21:11:56
问题 I have a project using firebase and the firebase auth ui library. The problem is I can't sign in using Google sign-in, when I try it loads for a second or two and then just shows a toast message saying "Developer Error". I can sign in with email and password just fine. And this is only a problem on signed apks, when I am debugging Google, sign-in works fine. In my proguard-rules.pro I have minifyEnabled set to false. And I have added the SHA-1 to my firebase project and have downloaded the

Firebase session length new console

ぐ巨炮叔叔 提交于 2019-12-05 20:05:47
问题 I can't seem to find the session length config in the new console. Also couldn't find any literature on it or session management in general. 回答1: In the new firebase version the session length is managed automatically for you, this means the sessions are alive as long as possible (not a specific timeframe) so users have to sign in less frequently. Only if an account changes drastically like password reset, email change etc. the session is revoked for security reasons. The only way to

FirebaseUI Authentication with Facebook not logging in

穿精又带淫゛_ 提交于 2019-12-05 19:47:47
I'm using FirebaseUI Auth in Android for user authentication. Dependencies in my app build.gradle for Facebook Login: compile 'com.google.firebase:firebase-auth:11.0.0' compile 'com.firebaseui:firebase-ui-auth:2.0.0' compile 'com.facebook.android:facebook-android-sdk:[4,5)' Classpath dependencies in my project build.gradle: classpath 'com.google.gms:google-services:3.1.0' My FirebaseUI Authentication Code in my Activity onCreate(): final AuthUI.IdpConfig facebookIdp = new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER) .setPermissions(Arrays.asList("email", "public_profile")) .build();

Quota exceeded when updating users with Firebase Admin SDK - how can I request more?

蹲街弑〆低调 提交于 2019-12-05 18:58:15
We try to update many users in our multitenant setup, when a whole tenant needs to be enabled/disabled. With this, we sometimes run into QUOTA_EXCEEDED errors, especially for large tenants with many users. I have asked how to do this better here: Disable many users at once As there are currently no bulk operations to update users with the Firebase Admin SDK , how can I request a quota raise? I do not see an enable/disable users in the Firebase Authentication Limits The error message does not indicate what has to be changed. It only says Exceeded quota for updating account information. I do not

Does deleting account from Firebase automatically logs user out?

℡╲_俬逩灬. 提交于 2019-12-05 18:37:57
I would like to know, does deleting account from Firebase automatically logs user out? I mean, if I want to show him after deleting the login screen, then I just have to present that VC? I am asking this because if I do like this, it crashes and I think it is because the user doesn't exists anymore at this points. Am I right? The code with some explenations : let user = FIRAuth.auth()?.currentUser user?.deleteWithCompletion { error in if let error = error { // An error happened. } else { try! FIRAuth.auth()!.signOut()//This is unnecessary? let mainStoryboard: UIStoryboard = UIStoryboard(name:

Handling authentification to Firebase Database with Fetch in a Service Worker

守給你的承諾、 提交于 2019-12-05 18:30:53
I'm trying to query a Firebase database from a Service Worker using the Fetch API. However it doesn't work as expected as I can't get authenticated correctly. Basically what I'm trying to do is from origin https://myproject.firebaseapp.com inside a Service Worker I do a call like this : var fetchOptions = {}; fetchOptions.credentials = 'include'; var url = options.messageUrl; var request = new Request('https://myproject.firebaseio.com/user/foobar.json', fetchOptions); messagePromise = fetch(request).then(function(response) { return response.json(); }); I'm getting this error : Fetch API cannot

Can't create a custom token in firebase cloud functions because the service account doesn't have the necessary permissions

偶尔善良 提交于 2019-12-05 18:25:41
When calling admin.auth().createCustomToken() , I get the following error: Permission iam.serviceAccounts.signBlob is required to perform this operation on service account projects/-/serviceAccounts/kaleido-maastricht@appspot.gserviceaccount.com.; Please refer to https://firebase.google.com/docs/auth/admin/create-custom-tokens for more details on how to use and troubleshoot this feature. So I go look at the mentioned service account in the IAM section of the cloud platform console, and it has the Editor role, which, indeed, does not have the signBlob permission. What role could I change it to

Android/Firebase - Check to see if you are subscribed to topic

随声附和 提交于 2019-12-05 18:20:49
问题 I am wondering if there is a way to test to see if you are subscribed to a topic on the android side of things. Basically, I am HOPING that all devices will subscribe to a topic during their installation, when the token is first obtained by the device. However, there is always a chance that the device fails to subscribe. The FCM registration token should be installed on the device for a long time, and thus, the onTokenRefresh() method shouldn't be called again without clearing data, uninstall