How to delete authentication user from firebase?

Viewed 32

My idea is that all users have right to delete their account and my project is to help them.

I find one easy function which do not work firebase.js

const auth = getAuth(app);

paneluser.jsx

import { useAuthState } from "react-firebase-hooks/auth";
import { auth, db, logout, storage } from "./firebase";

funt panel() {
    const [user] = useAuthState(auth);


const deleteAcount   = () => {
user.delete();
}

return (<> 
<button onClick={deleteAcount}/>)
0 Answers
Related