firebase-authentication

Is base64 a good option for encoding custom Document IDS for Firestore?

这一生的挚爱 提交于 2019-12-11 16:42:07
问题 I am working on creating some users in my firebase app and I would like to provide custom user ids as they are authenticating with an external service. For example my user ID generation is consisted by 2 parts like so: AuthService:AuthServiceUsername That can look in reality like: Instragram:dimitrioskanellopoulos But I dont like to have this string used as a user id so I encode it to base64 like so: const uid = Buffer.from(`instagram:${serviceUserID}`).toString('base64'); Is there any risk

How to use email and phone to authentication in Firebase?

試著忘記壹切 提交于 2019-12-11 16:28:08
问题 I am looking for a way in react-native to make user sign up with his phone number then add his email and password. But when a user logs in, he logs in only with email and password. The phone number is only for security reasons. I do a signInWithPhoneNumber() after user verify his number i call a createUserWithEmailAndPassword() but that's made in console Auth Two separate authentication in the same time "Email" & "Phone Number" code // I just pass the result into separate screen then use it

How can I allow my Unity app access to a Firebase realtime Database without user accounts and without public access?

一世执手 提交于 2019-12-11 16:16:03
问题 I am using the Firebase Unity SDK (5.4.3). I need the app to access a Realtime Database. Everything works fine when I have access configured to public, but I need to secure the database so it can only be read/modified through the app. I followed the instructions here: https://firebase.google.com/docs/database/unity/start for allowing the Editor to "configure the SDK to use a service account to run in the Unity Editor." This allows the Unity editor to access the database, but this does not

Firebase AuthUI: NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbgl

自作多情 提交于 2019-12-11 16:13:47
问题 My App crashes whenever I call this code: if (FirebaseAuth.getInstance().getCurrentUser() == null) { startActivityForResult( AuthUI.getInstance() .createSignInIntentBuilder() .setAvailableProviders(providers) .setLogo(R.drawable.shape_circle) .build(), RC_SIGN_IN); } The weird thing is this code always worked till today, I haven't changed anything here and I did not changed any dependencies. But just today it crashes with these Exceptions: 05-29 20:57:58.875 11408-11408/com.example.jonas

Android Firebase sign in with email and password

孤人 提交于 2019-12-11 16:03:57
问题 I have an android app and a Firebase database. The login I've set is with email and password. It works great, but when I try and login with blank email and password the app crashes. Here is my code final String Email = email.getText().toString(); final String Password = password.getText().toString(); mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(ThisActivity.this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task)

Auth triggered cloud function (create user) doesn't execute

自古美人都是妖i 提交于 2019-12-11 15:52:15
问题 Can't understand what am I doing wrong. I've deployed the functions successfully and I can see them in the project's dashboard, but the function doesn't execute when a new user is authenticated. The purpose of the function is to create a new user object in the database for this new registered user. When I register a new user (I've been using the google signin) - nothing happens in the database. When I go to the authentication tab though, I can see a new user was authenticated. This is my

Signout Firebase

不打扰是莪最后的温柔 提交于 2019-12-11 15:51:44
问题 I'm doing a signout on my APP like this : FirebaseAuth.getInstance().signOut(); The problem is that when I return to my Login Activity and I press again Sign in it does a re-login with the same account. What I'd like to do is something like this : Auth.GoogleSignInApi.signOut(mGoogleApliClient).setResultCallback(new ResultCallback<Status>() { @Override public void onResult(@NonNull Status status) { statusTextView.setText("Signed out"); } }); If I do this (it's a button from Login Activity) it

(How) can you log a user out of firebase?

丶灬走出姿态 提交于 2019-12-11 15:26:25
问题 We're using Firebase for our user authentication. I can log a user in on the client side and then run the following from a python app: import firebase_admin import firebase_admin.auth from firebase_admin import credentials from datetime import datetime cred = credentials.Certificate('my_creds.json') app = firebase_admin.initialize_app(cred) firebase_admin.auth.revoke_refresh_tokens('some-user-id', app=app) u = firebase_admin.auth.get_user('some-user-id') print(datetime.fromtimestamp(u.tokens

Can't use FirebaseUI with fragments

拈花ヽ惹草 提交于 2019-12-11 15:25:21
问题 I'm trying to implement FirebaseAuth UI to my app, but I've ran into some issues. I'm trying to create the FirebaseUIActivity.kt as a fragment, but when I call the support fragment manager it crashes. supportFragmentManager.beginTransaction().replace(R.id.fragment_container, FirebaseUIActivity.newInstance()).commit() Here is some code: MainActivity.kt class MainActivity : AppCompatActivity() { private lateinit var binding: ActivityMainBinding override fun onCreate(savedInstanceState: Bundle?)

How to block users by app version in Firebase

放肆的年华 提交于 2019-12-11 15:21:39
问题 I have an Android app that use Firebase for general chat room. Users enter their nickname and start to chat. There is no problem about implementation, my application works well. But the problem is about data usage. Data usage was too high because of wrong implementation. in app version 14 I was fetching all data in chat room, then show the last 100. This situation causes high usage in firebase data. There was daily 1-2GB download usage for 2k users. In fact it should be less. Then, a week ago