firebase-authentication

Organize Firebase database for individual users, idea?

百般思念 提交于 2019-12-11 05:07:38
问题 In my android app, i had implemented google sign in with Firebase Auth procedures. As: private void signIn() { Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient); startActivityForResult(signInIntent, SIGNIN_CODE); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == SIGNIN_CODE) { Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data

Different UID in Firebase Database and in Firebase Auth

做~自己de王妃 提交于 2019-12-11 04:57:47
问题 Currently I am trying to fetch user data, but there is one huge problem. The uid of currently logged in user is different then UID of the same user in my database. Here are two images where you can see it. Below the images is my code from my SignUpController in Swift. I need it to be the same for the database and auth. Thanks for help. And here is second one func emailSingUp(){ guard let email = emailTextField.text, let password = passwordTextField.text,let name = nameTextField.text else {

Firebase logs out current user when creating a new one

强颜欢笑 提交于 2019-12-11 04:56:03
问题 I'm creating an iPhone app where an admin user can create new users, but as the Firebase documentation states "If the new account was created, the user is signed in automatically" , so I'm looking for a way to avoid signing in to that newly created user. Is there any way I can avoid this without using the new Firebase Admin SDK (that is web only AFAIK)? 回答1: You can solve this in multiple ways: Option 1 : save the credentials of the admin user securely on your device. Then, when the user

'AuthDataResult' has no member uid error

北慕城南 提交于 2019-12-11 04:56:01
问题 I'm creating a new user within my firebase database, and I'm trying to set some more values to the user: name, email, password, DOB, etc. /* Create User with Email and Password Provided */ Auth.auth().createUser(withEmail: emailTextfield.text!, password: passwordTextField.text!, completion: { (user, error) in /* Handle errors that may occur while Creating user in Firebase */ if let error = error { let alertController = UIAlertController(title: "Error", message: error.localizedDescription,

How to differentiate between first time google Sign-In and successive google sign-In in an android application? [duplicate]

。_饼干妹妹 提交于 2019-12-11 04:55:49
问题 This question already has an answer here : Correct code location to check Firebase if a user has been created already? (1 answer) Closed 2 years ago . I am building an app where the user has to register first (google or Email). First time users will be directed to an activity where he/she will have enter their personal-details and Returning users will be directed to profile activity. I am using firebase authentication and Database for this. How do I check if the user has already registered

Google sign in not working after publishing in play store with having two sha1 keys

百般思念 提交于 2019-12-11 04:51:40
问题 i have two build flavours. Each have debug and release build types. i having two googleservice.json for two build flavours. All are working fine except gmail login. In local gmail login works fine. But after uploading app to playstore, gmail login not works. i update two sha1 key for debug and release in firebase console.and get the latest googleservice.json file. But still facing issue on play store. And i am having this in my proguard -keep class com.google.android.gms.** { *; } -dontwarn

Locking down Firebase DB access to specific apps

微笑、不失礼 提交于 2019-12-11 04:45:58
问题 I think from searching the web this is not technically possible but I want to ask again in case I'm missing something. I have an app that uses Firebase. Reading and writing is locked down through security rules for authorised users only but there's certain information I want unauthorised users to be able to access (so I don't have to put a login wall in front of them, influencing churn). What I want to know is, is there any way of locking down this read access that only my app can call the DB

Firebase Authentication depending on custom user type [closed]

北慕城南 提交于 2019-12-11 04:45:01
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I am new to Android and Firebase and I am trying to build an app with a Login Interface in it. Once a user is logged in, the app would direct him/her to a specific screen depending on the users user-type. I will have 3 user-types: Admin , Driver and Bus dispatcher . Do you have

How to obtain access token in Cloud Functions for Firebase when user signs up?

混江龙づ霸主 提交于 2019-12-11 04:44:50
问题 When a client signs in with Github, I would like to trigger a Cloud Function that retrieves the user's profile data from Github and stores it in /users/{uid}/profile in the Realtime database. I can trigger my cloud function when a new user signs up using: exports.fetchProfile = functions.auth.user().onCreate(event => { // user = event.data // uid = user.uid // access_token = ??? // todo: request user profile from Github using access_token // todo: save profile in /users/{uid}/profile }); But,

Firebase authentication duration is too persistent

六月ゝ 毕业季﹏ 提交于 2019-12-11 04:37:43
问题 Bit of context, I am trying to use Firebase for both authentication and data storage. Since my application deals with potentially sensitive data, the confidentiality features offered by Firebase (all Firebase communication is done via HTTPS according to their blog) seems like a great way to keep my data secured. In fact, the only problem I have with Firebase is that authentication last far longer than it should. As far as I can tell, it lasts through device resets, application rebuilds and