Does Checking Firebase Custom Claims in Flutter every 10 Minutes Cost A Lot of Money for 10K Users?

69 views Asked by At

I am using Firebase customClaim to check user's device id to prevent multi-devices use by one account. So I checked it using getIdTokenResult() for every 10 minutes. Now, I am worried if my app will have 10K users then the operational fee will be a lot. Does it really cost a lot? If it does, is there a way to cut down the cost? Thank you for helping me out.

     await user!.getIdTokenResult(false).then((result) {
        if (result.claims!.isNotEmpty) {
            idClaim = "${result.claims!["id01"]}";
            if(idClaim == deviceID){
              //Do not logout!
            } else {
              //Logout automatically
            }
        } else {
          // Send error message
        }
     }

1

There are 1 answers

0
Doug Stevenson On BEST ANSWER

There is no cost incurred by Firebase for this code. The pricing documentation is clear that Firebase Authentication is free to use except for certain operations.