Skip to content

Commit

Permalink
👍 Add deleteCurrentUser function
Browse files Browse the repository at this point in the history
  • Loading branch information
keik committed Nov 19, 2018
1 parent c38fed5 commit 08a0e08
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/FirebaseAuthRepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ export const getToken = async () => {
* sign out
*/
export const signOut = async () => await firebase.auth().signOut()

/**
* delete current user
*/
export const deleteCurrentUser = async () => {
const user = await getUser()
return user && (await user.delete())
}

0 comments on commit 08a0e08

Please sign in to comment.