HexaCrop
HexaCrop

Reputation: 4263

deleting data from firebase console just like in mongoose

I used mongoose database before. After the testing process and all we can delete the data from the mongoose website manually. Even the collection.

Now I am using firebase as my database and my question is that is there any functionality like removing authenticated user data manually from the database just like we do in mongoose. Or do we need to code to remove a particular user data from firebase?

I have a firebase.js

import * as firebase from 'firebase';

const config = {
    apiKey: "someKey",
    authDomain: "some domain",
    databaseURL: "someURL",
    projectId: "someID",
    storageBucket: "someBucket",
    messagingSenderId: "SomeId"
};

const firebaseApp = firebase.initializeApp(config);
export default firebaseApp;

and an index.js file:

import firebaseApp from './firebase';
firebaseApp.auth().onAuthStateChanged(user => {
    if (user) {
        console.log(user);
    } else {
        console.log('user needs to be signed in');
    }
})

On submission I am seeing user in the web console

Is there any way to visualize the authenticated user in the firebase console, so that I can delete it from the firebase web console?

in mongodb there will be a collection for the authentication purposes. That contain,say the username and password. Which is a collection of its own. And other collections based on other datas. What I am asking is that the user data authenticated by the above process, needs to be stored somewhere right in the firebase. Is there any way to get that user data and delete it?

Upvotes: 0

Views: 501

Answers (1)

Grimthorr
Grimthorr

Reputation: 6926

The Firebase Console is your backend entry-point to your app's data, features and services.

The Database section of the console enables you to freely add & remove data in the Realtime Database and Cloud Firestore:

Realtime Database

rtdb screenshot

Cloud Firestore

firestore screenshot

There is a separate section for Authentication in the Firebase Console. When a user registers for your app, their profile data is passed to Firebase from the authentication provider (Google, Facebook, etc), but only the identifier (username, email, phone number), created date, signed in date and unique ID are displayed in the Firebase Console:

authentication screenshot

You can manually delete user accounts from the Firebase Console without having to write code to do so. Deleting an account will delete the associated authentication data and will stop the user from logging into your app.

To manually delete a user account:

  1. Login to Firebase Console from a desktop browser
  2. Select Authentication from the left menu
  3. Hover over a user account in the list
  4. Click the 3-dot icon on the right of the user row
  5. Click "delete account" from the context menu

Upvotes: 2

Related Questions