Home > OS >  Are there factors that can lead to failing sign-out?
Are there factors that can lead to failing sign-out?

Time:05-06

I'm using Firebase Authentication specifically the FirebaseUI library, Also users can sign in via Email, Google, Facebook, or Twitter.

Firebase Authentication does not support adding custom fields such as wallet balance, profile settings, etc. (This strikes me as being a very unfortunate thing to do), So I decided to create a table for users in MySQL and it contains default fields that are already Firebase supported and custom fields.

Now let's suppose the user trying to sign in, If the user signed in successfully, Then I will create a second connection with the server to check if the user does not exist and after that add the user to the table.

Sometimes the second connection will fail for some reason, In this situation, I want to sign-out directly and never let the user can continue to use the app as a logged-in user.

The Questions

  • Are there factors that can lead to failing sign-out? Yes?, Please tell me what is the factors until I can handle that.
  • Can the user sign-out even if the network is not available?
  • What is the estimated time it may take to sign-out? Milliseconds or Seconds?

CodePudding user response:

Can the user sign-out even if the network is not available? What is the estimated time it may take to sign-out? Milliseconds or Seconds?

When you sign the user out from Firebase, all it does is remove the tokens that it keeps for that user. This means that the signing out is both instantaneous, and can be done when there is no network connection.

  • Related