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
}
}
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.