0

How to instant disable any logged in User to force logout or prevent from using any service in Android or Web App using Firebase Admin SDK?

I have already tried disabling user using firebase Admin SDK but that only prevent from new login but if user already logged in they don't do any thing ?

admin.auth().updateUser("uid", {
    disabled: true,
  });

Kindly Provide a way to instant disable already logged in user form using any service in Mobile or Web.

TBS
  • 11
  • 1
  • 1
    The user's token will be valid for 1 hour after the user signs in. Disabling the account does not change the validity of that token. You will have to wait for that 1 hour to elapse, or somehow notify the app code to force it to sign the user out so they can't sign back in. There are no workarounds to this - it's just the way it works. – Doug Stevenson Dec 30 '20 at 17:59
  • Actually, the documentation contains a recipe how you can communicate token revocation to the client through the Firebase Realtime Database: https://firebase.google.com/docs/auth/admin/manage-sessions#detect_id_token_revocation – Frank van Puffelen Dec 30 '20 at 18:05

0 Answers0