Send a Password Redefinition email
Im trying to put a option in my system for users who forget their password. In documentation I didnt found any info about it.
In firebase console I can search a user and send this email, I just wanna send the same email with a command from Kreait's library. Is it possible?
I would have to reverse engineer the Firebase CLI tool to see if there is an undocumented REST API endpoint that I could use for that. But as far as I see, it is not possible to get a list of users or search for a user via the REST API (see https://firebase.google.com/docs/reference/rest/auth/).
This library aims to replicate the functionality that is provided by the official SDKs (https://firebase.google.com/docs/reference/admin/), and those don't provide this feature as well.
So the official Firebase CLI tool would be the tool to use in this case.
On this reference (https://firebase.google.com/docs/reference/rest/auth/) I found these orientations. Reading what I wrote, I was not clear. I wanna provide a unique email, and then send a password reset email for this one.
I guess that feature can be incorporated to the library.

Ah, now I get it, thank you for clearing this up! This is indeed possible, I will create a new release with it shortly.
I tried to do something with your code.
I putted this on: Auth.php
public function sendPasswordResetEmail(string $email): void
{
$response = $this->client->sendPasswordResetEmail($email);
}
And this on: Auth/ApiClient.php
public function sendPasswordResetEmail(string $email = null): ResponseInterface
{
return $this->request('getOobConfirmationCode', array_filter([
'email' => $email,
'requestType' => "PASSWORD_RESET",
]));
}
And Worked! Can u see if I did it right?
You did :). I will add this to the library soon :)
Show! Thank u so much!
Here it is: https://github.com/kreait/firebase-php/releases/tag/3.4.0 - please note that the method signature is different than what you used.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.