Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

514
Views
¿Cómo crear una cuenta con Firebase y enviar un correo electrónico de verificación a ese correo electrónico?

Estoy creando una función de registro con React y Firebase en este momento, y cuando me registro, quiero enviar un código de autenticación al correo electrónico que escribe el usuario. Soy un principiante, por lo que el código puede ser extraño, pero ¿hay alguna forma de enviar el código de verificación desde este código?

 import React, { useRef, useState } from 'react'; import { Card, Button, Form, Alert } from "react-bootstrap" import { useAuth } from '../contexts/AuthContext'; export default function Signup() { const emailRef = useRef() const passwordRef = useRef() const passwordComfirmRef = useRef() const { signup, currentUser } = useAuth() const [error, setError] = useState("") const [loading, setLoading] = useState(false) async function handleSubmit(e){ e.preventDefault() if(passwordRef.current.value !== passwordComfirmRef.current.value){ return setError('Passwords do not match') } try{ setError("") setLoading(true) await signup(emailRef.current.value, passwordRef.current.value) } catch{ setError('we cant create account') } setLoading(false) } return <> <Card> <Card.Body> <h2 className="text-center mb-4">register</h2> {currentUser && currentUser.email} {error && <Alert className='alert alert-danger'>{error}</Alert>} <Form onSubmit={handleSubmit}> <Form.Group className='mb-2' id="email"> <Form.Label>email</Form.Label> <Form.Control type="email" ref={emailRef} /> </Form.Group> <Form.Group className='mb-2' id="password"> <Form.Label>password</Form.Label> <Form.Control type="password" ref={passwordRef} /> </Form.Group> <Form.Group className='mb-4' id="email"> <Form.Label>password comfirm</Form.Label> <Form.Control type="password" ref={passwordComfirmRef} /> </Form.Group> <Button disabled={loading} className='w-100' type='submit'> register </Button> <div className='w-100 text-center mt-3'> do you have account? <a className='text-primary'>lgoin</a> </div> </Form> </Card.Body> </Card> </>; }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!