Skip to content

Conversation

@saseungmin
Copy link
Collaborator

@saseungmin saseungmin commented Nov 29, 2020

  • firebase auth를 사용해서 로그인 기능 구현하기
  • localStorage를 사용해서 로그인 유지하기
  • 로그인 시 header 상태 변경하기 (logout)

- Implement login logic of Redux and components
- setItem and loadItem
- change header status
@saseungmin saseungmin merged commit 803ed19 into CodeSoom:main Nov 29, 2020
@saseungmin saseungmin added the enhancement New feature or request label Nov 29, 2020
@saseungmin saseungmin mentioned this pull request Nov 29, 2020
20 tasks
Comment on lines +21 to +25
if (user) {
const { email } = user;

dispatch(setUser(email));
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEffect로 감싸줘도 되지 않을까요?

Comment on lines +53 to +55
useEffect(() => () => {
dispatch(clearAuth());
}, [dispatch]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분이 호출되는 시점이 어떻게 될까요?
unmount 되는 시점에 auth 정보들을 clear해주는 목적이라면, react-use 라이브러리의 useUnmount를 사용해도 좋을 것 같아요~

@saseungmin saseungmin deleted the with-firebase-auth-login branch July 5, 2021 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants