firebase-authentication

Android FirebaseAuth getCurrentUser() returns user after fresh install/build

笑着哭i 提交于 2019-12-24 21:26:00
问题 I implemented an auto-login on my app's start, if the user signed in before and did not log-out. I do this via FirebaseAuth.getInstance().getCurrentUser() Now I build the debug-apk and install this on my physical Android phone. getCurrentUser() returns the last user I used on the Android emulator. I really don't want this to happen.. Has anyone an idea how to prevent this ? Or why is FirebaseAuth doing this ? Thanks! 回答1: So it turned out, that FirebaseAuth took the signed in Google account

Conflict with firebase-core:11.8.0' 'com.google.gms:google-services:3.2.0

妖精的绣舞 提交于 2019-12-24 20:18:39
问题 version conflict either by updating the version of the google-services plugin or updating the version of com.google.android.gms to 11.0.4. i tried this(Conflict with firebase 11.8.0 and google-services plugin 3.1.2) solution but failed Messages Gradle Build build.Gradle(Project Level) build.Gradle(App level) App level gradle code apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion "26.0.2" defaultConfig { applicationId "com.example.shadow.pakistannetcafe"

Firebase delete account along with Database and Storage on iOS

百般思念 提交于 2019-12-24 20:17:49
问题 I am trying to implement a function to delete current user's account on iOS. Account deletion works properly but the problem is that I cannot delete the account's data from Database and Storage when deleting an account. "currentUser.delete" deletes the account but I think there is no authentication to delete its data from Database and Storage. Permission denied message shows up in the log. After running this function, I get to see the account is gone in Firebase Console Authentication page

Invoke “Verify it's you” authentication page from a Firebase application

北战南征 提交于 2019-12-24 20:17:48
问题 In my Firebase application users can remove their accounts. I want to do the same thing which Google do when you're trying to remove your account: ask the user's password once more. Is it possible to invoke this dialog using Firebase Auth API? Or in some other way? 回答1: You can ask the user to reauthenticate. This is actually common practice for certain sensitive operations like deleting a Firebase user, updating a password or email. You would reauthenticate and check the auth_time in the new

Does Firebase anonymous authentication survive when clearing app cache?

巧了我就是萌 提交于 2019-12-24 20:15:12
问题 I found the Firebase anonymous authentication very interesting and I'm willing to implement it in my Android app. I read that authentication does not survive app uninstalls but does it survive when the user intentionally clears the app cache? Setting - Apps - MyApp - App Info - Storage - CLEAR DATA I really need to know that before actually implementing it. Thanks! 回答1: No, it will not survive. No data previously saved by the app will survive. The whole point of clearing app data is to make

Checking a users custom claims (is an admin) on login with React, Redux and Firebase

不羁岁月 提交于 2019-12-24 20:00:01
问题 I was wondering if someone could help me. I am currently building an admin dashboard, which can only be accessed by admins. I am using React, Redux and Firebase. I have managed to set custom claims on specific users in a cloud function like so: exports.addSuperAdminRole = functions.https.onCall((data, context) => { return admin.auth().getUserByEmail(data.email).then(user => { return admin.auth().setCustomUserClaims(user.uid, { superAdmin: true }) }).then(() => { return { message: `Success! $

Firebase trigger for enable/disable a user

好久不见. 提交于 2019-12-24 19:12:03
问题 In Firebase Auth console there is an option for each user such as Enable/Disable his account. How can I trigger this event in Firebase functions and in Android app? 回答1: function cannot trigger on this kind of event (at least not yet) , function will only triggered in these cases (checkout the doc) Firebase accounts will trigger user creation events for Cloud Functions when: A user creates an email account and password. A user signs in for the first time using a federated identity provider.

Firestore security rules email_verified not working

末鹿安然 提交于 2019-12-24 18:52:36
问题 If I create a new user with createUserWithEmailAndPassword , even though I didn't verify the mail yet, that user is already logged in. And his .emailVerified === false , and until here all good. Now, I go to the mail, verify it using the link, go back to the web app, it is still .emailVerified === false so I refresh the page, now .emailVerified === true . So I try to reach this doc: public async getPublicUserDetails() { const currentUserId = this._angularFireAuth.auth.currentUser.uid; try {

Firebase Authentication & React

荒凉一梦 提交于 2019-12-24 18:48:35
问题 I am new in react, I hope you can help me. I'm using firebase authentication + react for a small application. I have a component to login and another when logged, with that there's no problem. The problem arises when I update the page, it shows me for a few seconds the login component even though it is already logged. I guess this happens because in my constructor I have a variable "user: null" and only in componentDidMount I use the "onAuthStateChanged" method that firebase gives me to

Firebase, how to use auth service with a node.js RESTapi backend

独自空忆成欢 提交于 2019-12-24 18:23:39
问题 I'm a full-stack java script developer. I have a project, the front-end was developed using the vue.js. Back-end is developing using node.js express framework. My back-end is a RESTapi as well. Since my front-end UI design is finished, I created a fire-base project and hosted it. It was dead simple to host the front-end part. My back-end doesn't have a authentication part yet. I want to try the fire-base auth service in this project. Normal way how I would do authentication is like this. Pass