Closed produktive closed 4 years ago
The InMemory Cache is cleared after a script/request is terminated. If you're using another kind of cache provided by another library, you need to look up in their docs how to clear the cache.
I'm not sure what you mean, though: only the public keys from Google are cached, and these are not tied to a Firebase project or a project's name 🤔
Hmm, then I'm not sure what type of problem I'm experiencing. I had this working a few days ago. I deleted my old Firebase project (ccamd-fish-tracker) and created a new one (cca-md). Since then, I'm getting this error: PHP message: attempt to error The value 'eyJhbGciOiJSUzI...' is not a verified ID token:
This is my verify function:
function verify($tokenid) {
if (isset($tokenid)) {
$projectId = 'cca-md'; // cca-md
$idToken = $tokenid; // An ID token given to your backend by a Client application
$verifier = IdTokenVerifier::createWithProjectId($projectId);
try {
$token = $verifier->verifyIdToken($idToken);
} catch (IdTokenVerificationFailed $e) {
$data = $e->getMessage();
$token = null;
}
try {
$token = $verifier->verifyIdTokenWithLeeway($idToken, $leewayInSeconds = 300);
} catch (IdTokenVerificationFailed $e) {
$data = $e->getMessage();
$token = null;
}
} else {
$token = null;
}
return $token;
}
I'm not sure where it's still getting my old project name from?
Wow I'm an idiot. I found the problem, it was using the wrong project name is a different file. Sorry for the bother.
No problem, I was just about to suggest the same, and you saved me from writing it 😅. Glad you came to the solution yourself, it's always more satisfying this way 💪
How do I clear this cache? I created a new project and it is still looking for the old project name.