From 5a258814b324c44045a4c376492461e074cf80c0 Mon Sep 17 00:00:00 2001 From: 1shaked <40497915+1shaked@users.noreply.github.com> Date: Wed, 9 Mar 2022 15:42:27 +0200 Subject: [PATCH] added instructions on signout There were no docs about signing out with code example; now there is. --- packages/docs/content/service-options/auth.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/docs/content/service-options/auth.md b/packages/docs/content/service-options/auth.md index 15482ed..2e7c7e5 100644 --- a/packages/docs/content/service-options/auth.md +++ b/packages/docs/content/service-options/auth.md @@ -334,3 +334,13 @@ try { ``` The same code with work with facebook as well just change it to ``` FacebookAuthProvider ``` Full example is [here](https://dev.to/rodrigopv/nuxtjs-firebase-social-auth-3afe). + +### logout / signout +when you want to signout\logout with Nuxt there is an easy way to do so +``` +async logout() { + await this.$fire.auth?.signOut() + // whatever you want to do after you signout +} +``` +Generally, the firebase auth functions are already mapped; find more functions [here](https://firebase.google.com/docs/reference/js/v8/firebase.auth.Auth) all the options you have.