firebase / firebase-admin-dotnet

Firebase Admin .NET SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
369 stars 131 forks source link

Sending a password reset mail #373

Open glb-cblin opened 9 months ago

glb-cblin commented 9 months ago

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

The SDK is missing a method SendPasswordResetLinkAsync

More precisely, the use case would be to allow ReturnOobLink to be set to false EVEN IF we are authenticated

https://github.com/firebase/firebase-admin-dotnet/blob/master/FirebaseAdmin/FirebaseAdmin/Auth/Users/EmailActionLinkRequest.cs#L62

At the moment, we need to manually instanciate a HttpClient and to send the HTTP request like described at https://firebase.google.com/docs/reference/rest/auth?hl=fr#section-send-password-reset-email

Our exact use case is to create the user with a random password and then to send him a reset password link (but directly from the firebase servers, not from our servers)

If there is a better way (without using my own SMTP server), please share it with me

Steps to reproduce:

not relevant

Relevant Code:

not relevant