Next.js Discord

Discord Forum

How can I get user gmail in oob code of firebase?

Unanswered
Somali posted this in #help-forum
Open in Discord
SomaliOP
Hi everyone.
I'm trying to get the user email from the user password reset screen. What should I do?
I am waiting for your reply.

10 Replies

@Somali Hi everyone. I'm trying to get the user email from the user password reset screen. What should I do? I am waiting for your reply.
normally the user enters his email and then you already have the email. Controll the email by using a controlled input field and use the state data to do whatever you like to do with the email
SomaliOP
@B33fb0n3
Thanks for your help.
Could you please guide me?
@Somali <@301376057326567425> Thanks for your help. Could you please guide me?
sure, do this first:
function Form() {
  const [firstName, setFirstName] = useState(''); // Declare a state variable...
  // ...
  return (
    <input
      value={firstName} // ...force the input's value to match the state variable...
      onChange={e => setFirstName(e.target.value)} // ... and update the state variable on any edits!
    />
  );
}

And then read that state variable to get the email of the user.
I would like to get the email from this link.
how can i get it?
the user is redirected to the page from the reset link sent to his email.
In that case, I need to get the user's email from this link.
How can I do this?
@B33fb0n3
Could you please check this?
@Somali http://localhost:3002/admin/en/auth/password_reset?apiKey=AIzaSyALE9B9ErxN6KjL8_aaW6Nj4w5L_kNtFjo&oobCode=V8AfZwcB-qExu8gCvSXElMwOPMtMQr2fB8Eq7W1vr6EAAAGUpuoUzA&mode=signIn&lang=en
I am unfamiliar with the password resets on firebase. I can help you with general things, but don't have experience with firebase. All the best
SomaliOP
@B33fb0n3
Thank you for your help