I am using the Kreait Firebase Admin SDK for PHP. According to the docs, in order to validate a TokenID, first I need to create an $auth object running the following code:
$factory = (new Factory)
->withServiceAccount('...')
->withDatabaseUri('...');
$auth = $factory->createAuth();
However, this needs to be done on every single API Request, it takes about 1s to run it an it's very detremental to the user experience. Is there a way I can avoid to run it on every request or store the $auth object?