Log user out on user delete

515 views
Skip to first unread message

Jorge Andrés Vergara Ebratt

unread,
Jun 26, 2016, 10:39:13 PM6/26/16
to Firebase Google Group
Hi everyone,

I have a small questions, wondering if this can be done.

Is there a way to send a signal to my app if I delete a user from my Firebase admin console? 

I have an observer listening to auth and it's working like it's supposed to, if I delete authData from localStorage the app immediately sends me to the login screen, but when I delete a user from the Firebase console nothing happens, since the authData is saved in localStorage the app remains responsive (until the user breaks something)

Is there a way for me to let my app know I just deleted someone?

Thanks!

Bassam Ojeil

unread,
Jun 27, 2016, 5:18:33 PM6/27/16
to Firebase Google Group
Hey Jorge, once the short lived Id token expires, it won't be able to renew the session for that user and the user would be rendered useless. On the next page reload in web, the user will be signed out.

Bassam

Michael Bleigh

unread,
Jun 27, 2016, 5:23:36 PM6/27/16
to Firebase Google Group
If you're using the Firebase Realtime Database, you could add an additional step of keeping track of deleted users in the database. This will allow you to immediately disable access to the app via security rules, and by having each user listen on their own deleted node you could trigger an immediate client-side logout when the account is deleted. Food for thought!

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/73620d4e-3ff4-432a-b174-7aeb52c8252d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages