Reputation: 532
For some reason, my firebase project apikey associate with database changed. I can still create another api key, update into the application.
But when user try to reset password, the link use the old key and lead to "Your request to reset your password has expired or the link has already been used" (I think I read this problem somewhere and now I found the reason).
Is there anyway to update new api key for an existing firebase project?
Thank you
Upvotes: 12
Views: 12549
Reputation: 532
Somehow, my original apiKey was recovered. You can find the original key (which were deleted from console.google.com) associated with the application on the main firebase page, through
Overview > Project settings > GENERAL
Basically, when users requested to recover the password, firebase will send an email with recovery link. If you have a look at the link, you will see the API included in the link is the one that no longer exists.
I recommend you to contact firebase support. I don't have an official way to solve the issue but here is quick I can think of, following as
- Create new API at console.google.com > choose your firebase project
- Create a page with a function that can read URL parameters. Make it receive firebase recovery password URL and replace dead API with new one, then redirect you to new firebase recovery password URL
- Edit email template by adding the page you created on step 2, with firebase recovery full URL as a parameter
To be more accurate, here is an example. I have my project called "MyFirebaseProj", my domain is "example.com"
<a href='http://example.com/recover-password.html?url=%LINK%'>%LINK%</a>
Then save it
Now when user go into your recover password page, they will be redirected into firebase url with new API and it should works
Hope it helps!
Upvotes: 5
Reputation: 532
If anyone run into the same issue, as I get in touch with Firebase team and they are investigating about it. Currently there haven't been a way to help it.
Upvotes: 3