codestates / codestates/aneun-dongne

[ Dev-log ] 1/1 류준열

Open
#181 0 comments 0 reactions 0 assignees View on GitHub
Dev Log
Dominant language
JavaScript
Stars
6
Forks
7
PR merge metrics
No merged PRs in 30d

Description

> ### 오늘은 어떻게 프로젝트에 기여했나요?
> httpOnly:true 로 설정
> ### 오늘의 프로젝트에서 힘든 점은 무엇인가요?
> * 항목별로 적어주세요.
> 다른팀들에게 물어보니 local session storage에 로그인 했냐 안했냐 정보만 넣어주면 쿠키를 읽던 말던 상관이 없는내용이었다.
>
```js
await axios
.post(
`${process.env.REACT_APP_API_URL}/user/login`,
{
email,
password,
},
{ "Content-Type": "application/json", withCredentials: true }
)
.then((res) => {
setAccessToken(res.data.data.accessToken);
closeLoginModalHandler();
})
.then(() => {
handleResponseSuccess();
//이렇게 유저정보 필요없이 로긴했는지 안했는지마 넣어줌
window.sessionStorage.setItem("jwt", "일반로긴");
})
.catch(() => {
setErrorMessage(message.loginError);
});
};
```
스크린샷 2022-01-01 오후 9 03 23

이렇게 하면 쿠키를 읽을 필요가 없다.
그리고 유저정보도 노출될일이 없다 굿
>
> ### 내일은 프로젝트에 기여하기 위해 무엇을 해야 하나요?
> * [ ] Todo 형식으로 기록해주세요.

Contributor guide

No contributing guide indexed for this repository

Research direction

This is a development log rather than an actionable issue, and it names no file or test to change. It records a JavaScript login flow using axios, cookies, and sessionStorage; clarify a specific follow-up task and completion criteria before starting work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication, frontend
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
10/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.