We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 36c39af + 7a94cd8 commit eac18dfCopy full SHA for eac18df
1 file changed
components/auth/FindPasswordModal.tsx
@@ -3,6 +3,8 @@
3
import { useEffect, useRef, useState } from 'react';
4
import Button from './Button';
5
import FormField from './FormField';
6
+import { auth } from '@/lib/firebase';
7
+import { sendPasswordResetEmail } from 'firebase/auth';
8
9
type FindPasswordModalProps = {
10
onClose: () => void;
@@ -28,6 +30,13 @@ const FindPasswordModal = ({ onClose }: FindPasswordModalProps) => {
28
30
}
29
31
32
// 이메일 요청 로직
33
+ sendPasswordResetEmail(auth, email)
34
+ .then(() => {
35
+ alert('이메일이 발송되었습니다.');
36
+ })
37
+ .catch((error) => {
38
+ alert('에러 발생: ' + error.message);
39
+ });
40
};
41
42
// esc로 모달을 닫을 수 있는 기능
0 commit comments