Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 3c8f474

Browse files
[Feature Request] Add Delete User Capability #1554
1 parent 8724773 commit 3c8f474

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/AUTHENTICATION.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/auth.png" height="85px" alt="Authentication"/>
22

33
## Enabling Authentication
4-
You can sign in a user either
4+
You can sign in a user, using either
55

66
* [anonymously](#anonymous-login),
77
* by [email and password](#email-password-login),
@@ -199,6 +199,20 @@ The logged in user will be updated, but for `getCurrentUser` to reflect the chan
199199
);
200200
```
201201

202+
### Deleting a user
203+
The currently logged in user will be deleted (the one returned by `getCurrentUser`).
204+
205+
```js
206+
firebase.deleteUser().then(
207+
function () {
208+
// called when the user was successfully deleted
209+
},
210+
function (errorMessage) {
211+
console.log(errorMessage);
212+
}
213+
);
214+
```
215+
202216
### Anonymous login
203217
Don't forget to enable anonymous login in your firebase instance.
204218

0 commit comments

Comments
 (0)