백엔드 서버 서비스, 앱 개발 플랫폼 → 시간 절약하는데 사용
데이터구조: noSQL db
앱을 커스텀하는 상황에서는 비추
vite로 프로젝트 생성
https://firebase.google.com/docs/reference/js/auth.auth
authStateReady()
: returns a promise that resolves immediately when the initial auth state is settled. When the promise resolves, the current user might be a valid user or null
if the user signed out.위 코드 추가하는데 브라우저에 아무 컴포넌트도 보이지 않는다?
- firebase을 지웠다가 10.1.0 버전으로 다시 설치하라고 하는데 나는 안됐다.
- 알고보니 firebaseConfig 부분을 환경변수로 설정했는데 require() 부분에 에러가 나서 안보이는 것이었다.
- 임시방편으로 값을 그대로 넣어서 진행하는걸로..
https://firebase.google.com/docs/auth/web/password-auth
createUserWithEmailAndPassword(auth, email, password)
: 말 그대로 이메일과 비밀번호로 계정 생성할 때 사용하는 함수 → 비동기로 진행된다
이메일 검증이나 accessToken, refreshToken 등 생성된 계정에 대한 정보가 보인다
firebase Users에 들어가보면 계정이 추가된 것을 확인할 수 있다.