We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// ์ฟ ํค ๋๋ฉ์ธ ์ค์ ์ด ๋ค์๊ณผ ๊ฐ์ ๊ฒฝ์ฐ Domain=.example.com // ๊ฐ๋ฅ foo.example.com bar.example.com // ๋ถ๊ฐ anather.anather.com
front-end.herokuapp.com
back-end.herokuapp.com
com
Domain=.com
.herokuapp.com
deploy.herokuapp.com
deploy.herokuapp.com/api/auth/login
deploy.herokuapp.com/api/auth/register
import Cookies from 'universal-cookie'; const cookies = new Cookies(); cookies.set('myCat', 'Pacman'); const pet = cookies.get('myCat'); console.log('Pacman');
set
const client = axios.create(setPath(process.env.NODE_ENV)); client.interceptors.request.use((config) => { const token = getCookie('access_token'); config.headers.Authorization = `Bearer ${token}` || ''; return config; }); export default client;
secure
httpOnly
refreshToken
accessToken
Authorization
Originally posted by @saseungmin in saseungmin/Recoil_ToDo#57 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
๐ ํด๊ฒฐ ๋ฐฉ์ ๋ฐ ๊ฒฐ๋ก
front-end.herokuapp.com
,back-end.herokuapp.com
)com
์ ๊ณต๊ฐ ์ ๋ฏธ์ฌ ๋ชฉ๋ก์ ํด๋นํ๊ธฐ ๋๋ฌธ์ ์๋๋ค๋ ๊ฒ์ด์๋ค.Domain=.com
์ผ ๊ฒฝ์ฐ, ๊ฒฐ๊ตญ.herokuapp.com
๋ ํ์ ๋๋ฉ์ธ์ ์ํ๊ฒ ๋๊ณ , ๊ทธ๋๊น ๋ณด์์ ์น๋ช ์ ์ธ ์ํ์ ๋ผ์น ์ ์๋ค๋ ๊ฒ์ด์๋ค. ๋ญ์ผ ๊ทธ๋์ ์ด๋ป๊ฒ ํ๋ผ๋๊ฑฐ์ง..? ํ ์ ์๋ ๋ฐฉ๋ฒ์ ์๋๊ฑฐ์ผ?๐ฏ ์๊ฐํ ์ธ ๊ฐ์ง ๋ฐฉ๋ฒ
deploy.herokuapp.com
์ด๋ผ๋ ํ๋์ ๋๋ฉ์ธ์์ ๋ฐฑ์ค๋ ํ๋ก ํธ์ค๋๋ฅผ ๊ฐ์ด ๋ฐฐํฌํ์ฌ ํ๋ ๋ฐฉ๋ฒ์ด๋ค. (api ํธ์ถ์deploy.herokuapp.com/api/auth/login
,deploy.herokuapp.com/api/auth/register
) ์ด ๋ฐฉ๋ฒ์ด ๊ฐ์ฅ ์ข์๋ณด์์ง๋ง, ์ด๋ฏธ ๋ฐฑ์ค๋ ๋ถ๋ถ๊ณผ ํ๋ก ํธ์ค๋ ๋ถ๋ถ์ ๋ค๋ฅธ repository์ ๋ถ๋ฆฌํด๋์๊ณ , ๊ฐ์ด ํ๋์ ๋ ํฌ๋ก ๋ณ๊ฒฝํ๋ฉด ํ๋ก์ ํธ ๊ตฌ์กฐ ๋ฟ๋ง ์๋๋ผ ๋ชจ๋ ๊ฒ์ ๋ค ๋ฐ๊ฟ์ค์ผ ํ๋ค. ์ฆ, ์ค์ ํด๋์ CI/CD ๋ฟ๋ง ์๋๋ผ, test ์ค์ ๋ฑ๋ฑ.. ๋ค์ ๊ตฌ์กฐ๋ฅผ ์ก๊ณ ๋ฐฐํฌํ๋ค๋ ๊ฑฐ ์์ฒด๊ฐ ๋ง๋์๋๋ค๊ณ ์๊ฐ์ด ๋ค์๋ค.set
ํด์ฃผ๊ณ , ๋ฐฑ์ค๋๋ก ๋ณด๋ผ ๋๋ header์ ๋ด์ ๋ณด๋ด์ค ๋ค JWT๊ฐ ์ ํจํ์ง๋ฅผ ๊ฒ์ฌํด์ค๋ค.๐ ํ๊ณ์
secure
,httpOnly
์ฟ ํค ์ ์ฅ ๋ฐฉ์์ ์ด์ฉํ๋ฉด ๋๋ค. ์ด ๋ฐฉ๋ฒ์ ์ด์ฉํ๋ฉด JavaScript์์ ์ ๊ทผ์ด ๋ถ๊ฐ๋ฅํ๋ค. ํ์ง๋ง, ๋๊ฐ์ ์ฟ ํค ์ต์ ์ ํ์ฌ ๋ค๋ฅธ ๋๋ฉ์ธ์์ ์ฌ์ฉํ ์ ์๋ค.secure
์ต์ ์ ์ฌ์ฉํ๋ฉด ๊ฐ์ ๋๋ฉ์ธ์ ๊ณต์ ํด์ผ ํ๋ค. ๊ทธ๋ ๊ธฐ ๋๋ฌธ์ refreshToken์ ์ฌ์ฉํ์ฌ ์ด ๋ฐฉ๋ฒ์ ํด๊ฒฐํ๋ ค๊ณ ํด๋ ๊ฒฐ๊ตญ์refreshToken
์secure
,httpOnly
์ฟ ํค์ ์ ์ฅํด์ผ ๋๊ธฐ ๋๋ฌธ์refreshToken
์ ์ฌ์ฉํ๋ ๊ฑด ๋ถ๊ฐ๋ฅํ๋ค.refreshToken
์ ์ฌ์ฉํ ์ ์์ผ๋ฉด ๋ ์ต์ ์ ์ฟ ํค๋ก ์ ์ฅํ์ฌ CSRF ๊ณต๊ฒฉ์ ๋ฐฉ์ดํ๊ณ ,accessToken
์ ์ฌ์ฉํ์ฌ ๋ก์ปฌ ๋ณ์๋ก ์ ์ฅํ ๋ค, API๋ฅผ ์์ฒญํ ๋Authorization
ํค๋์ ๋ฃ์ด ๋ณด๋ด์ค๋ค.Originally posted by @saseungmin in saseungmin/Recoil_ToDo#57 (comment)
The text was updated successfully, but these errors were encountered: