-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refact: 리프레시 토큰 로컬스토리지 저장 방식 구현 리프레시 토큰이 쿠키에 저장되어 사용하던 로직을 로컬스토리지에 저장하고 사용하도록 변경 * Feat: 로그아웃 시 로컬스토리지에 있는 리프레시 토큰 삭제
- Loading branch information
Showing
6 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export const getCookie = (name: string) => { | ||
let value = document.cookie.match(`(^|;) ?${name}=([^;]*)(;|$)`); | ||
return value ? value[2] : null; | ||
}; | ||
export const deleteCookie = (name: string) => { | ||
document.cookie = name + "=; expires=Thu, 01 Jan 1999 00:00:10 GMT;"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters