firebase-authentication

How do I display list of only registered contacts(on firebase) from a client's address book(via phone numbers)

强颜欢笑 提交于 2019-12-10 11:59:13
问题 What I want to do is search through client's address book(phone numbers) and only display contacts who are registered on firebase by looking if their phone numbers are registered.(kind of like Whatsapp) Currently I am displaying all the registered users on firebase Code: public class Tab1 extends Fragment { private static final String TAG = "MyActivity"; private Button signOut; private FirebaseAuth.AuthStateListener authListener; private FirebaseAuth auth; ListView listView; private

How to run JUnit testing on Firebase Java with authentication?

隐身守侯 提交于 2019-12-10 11:53:28
问题 I am currently using Firebase Authentication in my mobile app. The back end is a Spring boot application. The REST APIs on the back end relies on a token generated from Firebase Authentication to retrieve the Firebase UID (verifyIDToken method) of a user to perform further functions. Currently, I notice that in Firebase Java API (server-based), there is no way of generating a token for a user, thus there is no easy way for me to do JUnit testing on the server that relies on user

Is there a way to trigger a Firebase Function when the user node is updated?

自古美人都是妖i 提交于 2019-12-10 11:37:49
问题 I have two nodes that contain a user's associated email. Whenever the user resets their authentication email, it is updated in the Firebase Authentication user node, as well as two additional nodes in my database via a fan-out technique. Each time a user updates their Authentication email they're sent an email address change notification which allows them to revert the email address change. The problem I am running into is that if a user reverts these changes, the proper email address is no

Firebase suddenly reports invalid signature

不想你离开。 提交于 2019-12-10 11:37:40
问题 We are current hosting a Java/Spring server including firebase ID token verification on SAP Cloud Platforms (Hana Cloud). The authentication worked fine for the last few month, but suddenly stopped working yesterday, then it recovered after ~30 minutes and today it suddenly stopped working again. The error always is: java.util.concurrent.ExecutionException: com.google.firebase.auth.FirebaseAuthException: Firebase ID token has invalid signature. See https://firebase.google.com/docs/auth/admin

Firebase Data Retrieval - Edit Annotation

六眼飞鱼酱① 提交于 2019-12-10 11:36:24
问题 I am currently working on an application where the users can save an annotation on their map and this all works great! The map location, name and subtitle are all sent to the database and the pin is put into the map. However, I am struggling to figure out how to pull this data back down from [Firebase][1] so the users are able to edit the previous information and then update it. 回答1: To read data, you want to use the observe attribute from your firebase reference. This returns a snapshot

Firebase .info/connected showing wrong connection states

时间秒杀一切 提交于 2019-12-10 11:16:52
问题 I am using the presence system in Firebase to show "Online", if my client is connected to the network and "Offline", if the connection gets lost somehow. This is very important for my client as it indicates, if the user can send a message now. It works well sometimes and sometimes not and there lies the problem. This is what I am doing, mConnectionRef = FirebaseDatabase.getInstance().getReference(".info/connected"); mConnectionRef.addValueEventListener(mPresenceListener); and this, private

How would I create Usernames with Firebase?

帅比萌擦擦* 提交于 2019-12-10 11:02:44
问题 I am still new to swift and coding with Xcode and using Firebase. I have been able to create a sign up and login page with Firebase authentication. I have been wondering how would I allow people to create custom unique usernames. I have been searching for a while now on the web and I can't find much. I want to learn how to implement usernames with in my app so users can create unique usernames and have their own profiles. 回答1: In addition to my comment. let currentUserId = FIRAuth.auth()?

How do I query other Firebase Users?

孤街醉人 提交于 2019-12-10 10:57:41
问题 I've updated to the newest Firebase (3.2) but can't figure out how to query other users. I've gotten their FacebookID from the Facebook SDK and want to pull data from Firebase based off of that. I want to do something like below but need to do it on FIRUser instead. let climbRef = FIRDatabase.database().reference().child("/climb") let climbQuery = climbRef.queryOrderedByChild("userId").queryEqualToValue(userId) 来源: https://stackoverflow.com/questions/37449635/how-do-i-query-other-firebase

How to validate usernames using matches(regex)?

久未见 提交于 2019-12-10 10:45:58
问题 I'm trying to put the following expression into the matches function but I guess errors when trying to compile the rules. ^[a-zA-Z](([\._\-][a-zA-Z0-9])|[a-zA-Z0-9])*[a-z0-9]$ .validate rule looks as follows: ".validate": "newData.val() === auth.uid && newData.val().matches(^(?=.{5,10}$)(?!.*[._-]{2})[a-z][a-z0-9._-]*[a-z0-9]$)" I get: " Invalid escape: '\.'" 回答1: It appears you cannot use lookarounds in Firebase, so your pattern and the whole approach should be adjusted to account for that.

Firebase User ID Allowed Characters

独自空忆成欢 提交于 2019-12-10 10:38:53
问题 I am creating a key combining two Firebase user IDs, such as . Would anyone know the character set of which Firebase User IDs are comprised of? Ideally, the delimiter should not be in the possible character set forming the Firebase user IDs. (P.S.: Am planning on using underscore "_" or double underscore "__" as the delimiter). 回答1: The auto generated latest version Firebase uids are alphanumeric with no dashes or underscores. The previous version of Firebase used uuid for uids. So those