-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from Ong-gi-Jong-gi/dev
[DEPLOY] 로그인 인증 방식 변경 로직 추가
- Loading branch information
Showing
12 changed files
with
102 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,7 @@ dist-ssr | |
*.sw? | ||
|
||
.env | ||
*storybook.log | ||
*storybook.log | ||
|
||
# key files | ||
/cert |
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,18 @@ | ||
import { api } from '..'; | ||
import API from '../../constants/API'; | ||
|
||
export const tokenRefresh = async () => { | ||
const { headers } = await api({ | ||
method: 'post', | ||
url: API.AUTH.REFRESH, | ||
withCredentials: true, // 쿠키를 포함시키기 위해 필요 | ||
}); | ||
|
||
const authorization = headers['authorization']; | ||
|
||
if (authorization) { | ||
localStorage.setItem('accessKey', authorization); | ||
} else { | ||
throw new Error('Failed to refresh token: no authorization header found.'); | ||
} | ||
}; |
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
This file was deleted.
Oops, something went wrong.
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,17 +1,28 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import react from '@vitejs/plugin-react'; | ||
import { defineConfig } from 'vite'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
server: { | ||
host: '0.0.0.0', | ||
port: 5173, | ||
}, | ||
define: { | ||
global: {}, | ||
}, | ||
build: { | ||
chunkSizeWarningLimit: 1600, | ||
}, | ||
export default defineConfig(({ mode }) => { | ||
return { | ||
plugins: [react()], | ||
server: { | ||
host: '0.0.0.0', | ||
port: 5173, | ||
https: | ||
mode === 'production' | ||
? {} | ||
: { | ||
key: fs.readFileSync(path.resolve('./cert', 'localhost-key.pem')), | ||
cert: fs.readFileSync(path.resolve('./cert', 'localhost.pem')), | ||
}, | ||
}, | ||
define: { | ||
global: {}, | ||
}, | ||
build: { | ||
chunkSizeWarningLimit: 1600, | ||
}, | ||
}; | ||
}); |