forked from codesquad-members-2024/issue-tracker
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP: 깃허브 로그인 중 * WIP: 깃허브 로그인 * feat: 로컬 스토리지 토큰 읽어오기 * feat: authorization 추가
- Loading branch information
1 parent
3d34ac5
commit c8c2ba1
Showing
5 changed files
with
62 additions
and
13 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
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
export const getUserId = () => { | ||
return localStorage.getItem('storeUserData') ? JSON.parse(localStorage.getItem('storeUserData')).memberProfile.id : ''; | ||
}; | ||
export const getUserImg = () => { | ||
return localStorage.getItem('storeUserData') ? JSON.parse(localStorage.getItem('storeUserData')).memberProfile.imgUrl : ''; | ||
}; | ||
export const getUserId = () => (localStorage.getItem('storeUserData') ? JSON.parse(localStorage.getItem('storeUserData')).memberProfile.id : ''); | ||
|
||
export const getUserImg = () => (localStorage.getItem('storeUserData') ? JSON.parse(localStorage.getItem('storeUserData')).memberProfile.imgUrl : ''); | ||
|
||
export const getAccessToken = () => | ||
localStorage.getItem('storeUserData') ? JSON.parse(localStorage.getItem('storeUserData')).tokenResponse.accessToken : ''; | ||
|
||
export const getRefreshToken = () => | ||
localStorage.getItem('storeUserData') ? JSON.parse(localStorage.getItem('storeUserData')).tokenResponse.refreshToken : ''; |