{"id":39000,"date":"2024-11-02T02:36:14","date_gmt":"2024-11-02T02:36:14","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=39000"},"modified":"2024-11-26T06:42:41","modified_gmt":"2024-11-26T06:42:41","slug":"%eb%a6%ac%ec%95%a1%ed%8a%b8%eb%a1%9c-%ed%92%80%ec%8a%a4%ed%83%9d-%ec%95%a0%ed%94%8c%eb%a6%ac%ec%bc%80%ec%9d%b4%ec%85%98-%ea%b5%ac%ec%b6%95%ed%95%98%ea%b8%b0-jwt%eb%a5%bc-%ed%99%9c%ec%9a%a9%ed%95%9c","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/39000\/","title":{"rendered":"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604"},"content":{"rendered":"<article>\n<p>\ub9ac\uc561\ud2b8\ub294 \ud604\uc7ac \uac00\uc7a5 \uc778\uae30 \uc788\ub294 \ud504\ub860\ud2b8\uc5d4\ub4dc \ub77c\uc774\ube0c\ub7ec\ub9ac \uc911 \ud558\ub098\ub85c, \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4\ub97c \uad6c\ucd95\ud558\ub294 \ub370 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc774 \ube14\ub85c\uadf8 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\uc5d0 \ub300\ud55c \uae30\ubcf8\uc801\uc778 \ubc30\uacbd \uc9c0\uc2dd\uacfc \ud568\uaed8, \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uad6c\ucd95\ud558\uace0 JWT(Json Web Token)\ub97c \ud65c\uc6a9\ud558\uc5ec \uc778\uc99d \uae30\ub2a5\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\uc758 \uae30\ubcf8 \uac1c\ub150\ubd80\ud130 \uc2dc\uc791\ud558\uc5ec, Express.js\ub97c \uc774\uc6a9\ud55c \ubc31\uc5d4\ub4dc \uad6c\ucd95 \ubc0f JWT \uae30\ubc18\uc758 \uc778\uc99d \uc2dc\uc2a4\ud15c \uad6c\ud604\uae4c\uc9c0 \ub2e8\uacc4\ubcc4\ub85c \uc548\ub0b4\ud569\ub2c8\ub2e4.<\/p>\n<h2>1. \ub9ac\uc561\ud2b8\ub780?<\/h2>\n<p>\ub9ac\uc561\ud2b8\ub294 Facebook\uc5d0\uc11c \uac1c\ubc1c\ud55c \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub85c, UI \uad6c\uc131 \uc694\uc18c\ub97c \ub9cc\ub4e4\uace0 \uad00\ub9ac\ud558\ub294 \ub370 \ucd5c\uc801\ud654\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. \ub9ac\uc561\ud2b8\uc758 \uc8fc\uc694 \ud2b9\uc9d5 \uc911 \ud558\ub098\ub294 \ub2e8\ubc29\ud5a5 \ub370\uc774\ud130 \ud750\ub984\uacfc \uac00\uc0c1 DOM\uc785\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \ub192\uc740 \uc131\ub2a5\uacfc \ud6a8\uc728\uc131\uc744 \uc790\ub791\ud569\ub2c8\ub2e4.<\/p>\n<h3>1.1 \ub9ac\uc561\ud2b8\uc758 \ud2b9\uc9d5<\/h3>\n<ul>\n<li>\ucef4\ud3ec\ub10c\ud2b8 \uae30\ubc18: UI\ub97c \ub3c5\ub9bd\uc801\uc778 \ucef4\ud3ec\ub10c\ud2b8\ub85c \ub098\ub204\uc5b4 \uc7ac\uc0ac\uc6a9\uc131\uacfc \uc720\uc9c0 \ubcf4\uc218\uc131\uc744 \ub192\uc785\ub2c8\ub2e4.<\/li>\n<li>\ub2e8\ubc29\ud5a5 \ub370\uc774\ud130 \ud750\ub984: \ub370\uc774\ud130\uac00 \ubd80\ubaa8\uc5d0\uc11c \uc790\uc2dd \ucef4\ud3ec\ub10c\ud2b8\ub85c\ub9cc \ud750\ub974\uba70, \uc774\ub85c \uc778\ud574 \ub370\uc774\ud130 \uad00\ub9ac\uac00 \uc6a9\uc774\ud569\ub2c8\ub2e4.<\/li>\n<li>\uac00\uc0c1 DOM: \uc2e4\uc81c DOM \uc870\uc791\uc744 \ucd5c\uc18c\ud654\ud558\uc5ec \uc131\ub2a5\uc744 \ud5a5\uc0c1\uc2dc\ud0b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>2. \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774\ub780?<\/h2>\n<p>\ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc740 \ud504\ub860\ud2b8\uc5d4\ub4dc\uc640 \ubc31\uc5d4\ub4dc\ub97c \ud3ec\ud568\ud558\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc758\ubbf8\ud569\ub2c8\ub2e4. \ud504\ub860\ud2b8\uc5d4\ub4dc\ub294 \uc0ac\uc6a9\uc790\uc640 \uc0c1\ud638\uc791\uc6a9\ud558\uba70, \ubc31\uc5d4\ub4dc\ub294 \ub370\uc774\ud130 \ucc98\ub9ac\uc640 \uc800\uc7a5\uc744 \ub2f4\ub2f9\ud569\ub2c8\ub2e4. \uc774 \ub450 \ubd80\ubd84\uc774 \uc0c1\ud638\uc791\uc6a9\ud558\uc5ec \uc0ac\uc6a9\uc790\uc5d0\uac8c \uc6d0\ud65c\ud55c \uacbd\ud5d8\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n<h2>3. JWT(Json Web Token)\ub780?<\/h2>\n<p>JWT\ub294 JSON \ud615\uc2dd\uc73c\ub85c \uc815\ubcf4\ub97c \uc548\uc804\ud558\uac8c \uc804\uc1a1\ud558\uae30 \uc704\ud55c \ucef4\ud329\ud2b8\ud558\uace0 \ub3c5\ub9bd\uc801\uc778 \ubc29\ubc95\uc785\ub2c8\ub2e4. JWT\ub294 \uc8fc\ub85c \uc778\uc99d \ubc0f \ub370\uc774\ud130 \uad50\ud658\uc758 \ubaa9\uc801\uc73c\ub85c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \ubc1c\uae09\uc790\ub294 JWT\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc815\ubcf4\ub97c \uc548\uc804\ud558\uac8c \uc804\ub2ec\ud558\uace0, \uc774\ub97c \ud1b5\ud574 \uc0ac\uc6a9\uc790\uc758 \uc2e0\uc6d0\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1 JWT\uc758 \uad6c\uc870<\/h3>\n<p>JWT\ub294 \ud06c\uac8c \uc138 \ubd80\ubd84\uc73c\ub85c \uad6c\uc131\ub429\ub2c8\ub2e4:<\/p>\n<ul>\n<li><strong>Header<\/strong>: \ud1a0\ud070\uc758 \ud0c0\uc785\uacfc \uc0ac\uc6a9\ub41c \uc54c\uace0\ub9ac\uc998 \uc815\ubcf4\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>Payload<\/strong>: \uc0ac\uc6a9\uc790 \uad00\ub828 \uc815\ubcf4\uc640 \ud074\ub808\uc784(Claims)\uc744 \ub2f4\uace0 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li><strong>Signature<\/strong>: \ubc1c\uae09\uc790\uac00 \uc54c\uace0\ub9ac\uc998\uc744 \uc0ac\uc6a9\ud558\uc5ec Header\uc640 Payload\ub97c \uc11c\uba85\ud55c \uac12\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>4. \ub9ac\uc561\ud2b8\uc640 Express\ub97c \uc774\uc6a9\ud55c \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30<\/h2>\n<p>\uc774\ubc88 \uc139\uc158\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8 \ud504\ub860\ud2b8\uc5d4\ub4dc\uc640 Express \ubc31\uc5d4\ub4dc\ub97c \uacb0\ud569\ud558\uc5ec \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uad6c\ucd95\ud569\ub2c8\ub2e4. \uac04\ub2e8\ud55c \uc0ac\uc6a9\uc790 \uc778\uc99d \uc2dc\uc2a4\ud15c\uc744 \uad6c\ud604\ud558\uba70, \uac01 \ub2e8\uacc4\uc5d0\uc11c \ud544\uc694\ud55c \ucf54\ub4dc\uc640 \uc124\uba85\uc744 \uc81c\uacf5\ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>4.1 \ud504\ub85c\uc81d\ud2b8 \uc124\uc815<\/h3>\n<p>\uba3c\uc800, \ub9ac\uc561\ud2b8\uc640 Express \ud504\ub85c\uc81d\ud2b8\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \uc544\ub798\ub294 \ud504\ub85c\uc81d\ud2b8 \uc0dd\uc131\uacfc \uae30\ubcf8 \ub514\ub809\ud1a0\ub9ac \uad6c\uc870\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>npx create-react-app my-app\nmkdir server\ncd server\nnpm init -y\nnpm install express jsonwebtoken bcryptjs cors dotenv<\/code><\/pre>\n<h3>4.2 \ubc31\uc5d4\ub4dc \uad6c\ud604<\/h3>\n<p>Express\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud55c \uc11c\ubc84\ub97c \uad6c\ud604\ud569\ub2c8\ub2e4. \uc778\uc99d \uae30\ub2a5\uc744 \uc704\ud55c API \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \uc124\uc815\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>const express = require('express');\nconst app = express();\nconst jwt = require('jsonwebtoken');\nconst bcrypt = require('bcryptjs');\nconst cors = require('cors');\nrequire('dotenv').config();\n\napp.use(cors());\napp.use(express.json());\n\nlet users = []; \/\/ \uc0ac\uc6a9\uc790 \ub370\uc774\ud130 \uc800\uc7a5\uc18c\n\n\/\/ \ud68c\uc6d0\uac00\uc785 API\napp.post('\/api\/register', async (req, res) =&gt; {\n    const { username, password } = req.body;\n    const hashedPassword = await bcrypt.hash(password, 10);\n    users.push({ username, password: hashedPassword });\n    res.status(201).send('User registered');\n});\n\n\/\/ \ub85c\uadf8\uc778 API\napp.post('\/api\/login', async (req, res) =&gt; {\n    const { username, password } = req.body;\n    const user = users.find(user =&gt; user.username === username);\n    if (!user) return res.status(400).send('User not found');\n    \n    const isPasswordValid = await bcrypt.compare(password, user.password);\n    if (!isPasswordValid) return res.status(403).send('Invalid password');\n    \n    const token = jwt.sign({ username }, process.env.SECRET_KEY, { expiresIn: '1h' });\n    res.json({ token });\n});\n\n\/\/ \uc11c\ubc84 \uc2dc\uc791\nconst PORT = process.env.PORT || 5000;\napp.listen(PORT, () =&gt; console.log(`Server running on port ${PORT}`));<\/code><\/pre>\n<h3>4.3 \ud504\ub860\ud2b8\uc5d4\ub4dc \uad6c\ud604<\/h3>\n<p>\ub9ac\uc561\ud2b8 \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud68c\uc6d0\uac00\uc785 \ubc0f \ub85c\uadf8\uc778 \uc778\ud130\ud398\uc774\uc2a4\ub97c \uad6c\ud604\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>import React, { useState } from 'react';\n    import axios from 'axios';\n\n    const App = () =&gt; {\n        const [username, setUsername] = useState('');\n        const [password, setPassword] = useState('');\n        const [token, setToken] = useState('');\n\n        const register = async () =&gt; {\n            await axios.post('http:\/\/localhost:5000\/api\/register', { username, password });\n            alert('User registered!');\n        };\n\n        const login = async () =&gt; {\n            const response = await axios.post('http:\/\/localhost:5000\/api\/login', { username, password });\n            setToken(response.data.token);\n        };\n\n        return (\n            <div>\n                <h1>\ud68c\uc6d0\uac00\uc785<\/h1>\n                <input ==\"\" onchange=\"{e\" value=\"{username}\"\/> setUsername(e.target.value)} placeholder=\"Username\" \/&gt;\n                <input ==\"\" onchange=\"{e\" type=\"password\" value=\"{password}\"\/> setPassword(e.target.value)} placeholder=\"Password\" \/&gt;\n                <button onclick=\"{register}\">\ud68c\uc6d0\uac00\uc785<\/button>\n\n                <h1>\ub85c\uadf8\uc778<\/h1>\n                <button onclick=\"{login}\">\ub85c\uadf8\uc778<\/button>\n\n                {token &amp;&amp; <h2>\ub85c\uadf8\uc778 \uc131\uacf5, JWT Token: {token}<\/h2>}\n            <\/div>\n        );\n    };\n\n    export default App;<\/code><\/pre>\n<h2>5. JWT \uc778\uc99d\uc744 \uc704\ud55c \ubcf4\ud638\ub41c \ub77c\uc6b0\ud305<\/h2>\n<p>\uc0ac\uc6a9\uc790\uac00 \ub85c\uadf8\uc778\ud55c \ud6c4, JWT\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubcf4\ud638\ub41c API\ub97c \ud638\ucd9c\ud560 \uc218 \uc788\uac8c \uc124\uc815\ud569\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00 \uc694\uccad\ud560 \ub54c\ub9c8\ub2e4 \uc778\uc99d \ud1a0\ud070\uc744 \ud3ec\ud568\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<pre><code>app.get('\/api\/protected', (req, res) =&gt; {\n        const token = req.headers['authorization'];\n        if (!token) return res.sendStatus(403);\n\n        jwt.verify(token.split(' ')[1], process.env.SECRET_KEY, (err, user) =&gt; {\n            if (err) return res.sendStatus(403);\n            res.send(`Hello ${user.username}`);\n        });\n    });<\/code><\/pre>\n<h2>6. \uacb0\ub860<\/h2>\n<p>\uc774\ubc88 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uad6c\uc131\ud558\uace0, JWT\ub97c \ud1b5\ud574 \uc778\uc99d \uae30\ub2a5\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubd24\uc2b5\ub2c8\ub2e4. \ub9ac\uc561\ud2b8\uc640 Express\uc758 \uc870\ud569\uc740 \uac15\ub825\ud558\uba70, JWT\ub97c \ud1b5\ud574 \uc548\uc804\ud558\uace0 \ud6a8\uc728\uc801\uc778 \uc0ac\uc6a9\uc790 \uc778\uc99d\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4. \uc774\ub7ec\ud55c \uacfc\uc815\uc744 \ud1b5\ud574 \uc5ec\ub7ec\ubd84\ub4e4\uc758 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 \uc778\uc99d \uae30\ub2a5\uc744 \uc190\uc27d\uac8c \uc801\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc5ec\uae30\uc11c \ubc30\uc6b4 \uae30\uc220\ub4e4\uc740 \uc2e4\uc81c \ud504\ub85c\uc81d\ud2b8\uc5d0 \uc801\uc6a9\ud558\uc5ec \ub354\uc6b1 \ubc1c\uc804\uc2dc\ud0ac \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>7. \ucd94\uac00 \ub9ac\uc18c\uc2a4<\/h2>\n<p>\ucd94\uac00\uc801\uc73c\ub85c \ud559\uc2b5\ud560 \uc218 \uc788\ub294 \uc790\ub8cc\ub4e4\uc744 \uc544\ub798\uc5d0 \uc815\ub9ac\ud558\uc600\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li><a href=\"https:\/\/reactjs.org\/docs\/getting-started.html\" target=\"_blank\" rel=\"noopener\">\ub9ac\uc561\ud2b8 \uacf5\uc2dd \ubb38\uc11c<\/a><\/li>\n<li><a href=\"https:\/\/expressjs.com\/en\/starter\/installing.html\" target=\"_blank\" rel=\"noopener\">Express.js \uacf5\uc2dd \ubb38\uc11c<\/a><\/li>\n<li><a href=\"https:\/\/jwt.io\/\" target=\"_blank\" rel=\"noopener\">JWT.io<\/a><\/li>\n<\/ul>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>\ub9ac\uc561\ud2b8\ub294 \ud604\uc7ac \uac00\uc7a5 \uc778\uae30 \uc788\ub294 \ud504\ub860\ud2b8\uc5d4\ub4dc \ub77c\uc774\ube0c\ub7ec\ub9ac \uc911 \ud558\ub098\ub85c, \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4\ub97c \uad6c\ucd95\ud558\ub294 \ub370 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc774 \ube14\ub85c\uadf8 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\uc5d0 \ub300\ud55c \uae30\ubcf8\uc801\uc778 \ubc30\uacbd \uc9c0\uc2dd\uacfc \ud568\uaed8, \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uad6c\ucd95\ud558\uace0 JWT(Json Web Token)\ub97c \ud65c\uc6a9\ud558\uc5ec \uc778\uc99d \uae30\ub2a5\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\uc758 \uae30\ubcf8 \uac1c\ub150\ubd80\ud130 \uc2dc\uc791\ud558\uc5ec, Express.js\ub97c \uc774\uc6a9\ud55c \ubc31\uc5d4\ub4dc \uad6c\ucd95 \ubc0f JWT \uae30\ubc18\uc758 \uc778\uc99d \uc2dc\uc2a4\ud15c \uad6c\ud604\uae4c\uc9c0 \ub2e8\uacc4\ubcc4\ub85c \uc548\ub0b4\ud569\ub2c8\ub2e4. &hellip; <a href=\"https:\/\/atmokpo.com\/w\/39000\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[191],"tags":[],"class_list":["post-39000","post","type-post","status-publish","format-standard","hentry","category-react"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/39000\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ub9ac\uc561\ud2b8\ub294 \ud604\uc7ac \uac00\uc7a5 \uc778\uae30 \uc788\ub294 \ud504\ub860\ud2b8\uc5d4\ub4dc \ub77c\uc774\ube0c\ub7ec\ub9ac \uc911 \ud558\ub098\ub85c, \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4\ub97c \uad6c\ucd95\ud558\ub294 \ub370 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc774 \ube14\ub85c\uadf8 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\uc5d0 \ub300\ud55c \uae30\ubcf8\uc801\uc778 \ubc30\uacbd \uc9c0\uc2dd\uacfc \ud568\uaed8, \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uad6c\ucd95\ud558\uace0 JWT(Json Web Token)\ub97c \ud65c\uc6a9\ud558\uc5ec \uc778\uc99d \uae30\ub2a5\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\uc758 \uae30\ubcf8 \uac1c\ub150\ubd80\ud130 \uc2dc\uc791\ud558\uc5ec, Express.js\ub97c \uc774\uc6a9\ud55c \ubc31\uc5d4\ub4dc \uad6c\ucd95 \ubc0f JWT \uae30\ubc18\uc758 \uc778\uc99d \uc2dc\uc2a4\ud15c \uad6c\ud604\uae4c\uc9c0 \ub2e8\uacc4\ubcc4\ub85c \uc548\ub0b4\ud569\ub2c8\ub2e4. &hellip; \ub354 \ubcf4\uae30 &quot;\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/39000\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-02T02:36:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:42:41+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/39000\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/39000\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604\",\"datePublished\":\"2024-11-02T02:36:14+00:00\",\"dateModified\":\"2024-11-26T06:42:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/39000\/\"},\"wordCount\":45,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"React\ud504\ub860\ud2b8\uc5d4\ub4dc\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/39000\/\",\"url\":\"https:\/\/atmokpo.com\/w\/39000\/\",\"name\":\"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-02T02:36:14+00:00\",\"dateModified\":\"2024-11-26T06:42:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/39000\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/39000\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/39000\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/39000\/","og_locale":"ko_KR","og_type":"article","og_title":"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ub9ac\uc561\ud2b8\ub294 \ud604\uc7ac \uac00\uc7a5 \uc778\uae30 \uc788\ub294 \ud504\ub860\ud2b8\uc5d4\ub4dc \ub77c\uc774\ube0c\ub7ec\ub9ac \uc911 \ud558\ub098\ub85c, \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4\ub97c \uad6c\ucd95\ud558\ub294 \ub370 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc774 \ube14\ub85c\uadf8 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\uc5d0 \ub300\ud55c \uae30\ubcf8\uc801\uc778 \ubc30\uacbd \uc9c0\uc2dd\uacfc \ud568\uaed8, \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uad6c\ucd95\ud558\uace0 JWT(Json Web Token)\ub97c \ud65c\uc6a9\ud558\uc5ec \uc778\uc99d \uae30\ub2a5\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\uc758 \uae30\ubcf8 \uac1c\ub150\ubd80\ud130 \uc2dc\uc791\ud558\uc5ec, Express.js\ub97c \uc774\uc6a9\ud55c \ubc31\uc5d4\ub4dc \uad6c\ucd95 \ubc0f JWT \uae30\ubc18\uc758 \uc778\uc99d \uc2dc\uc2a4\ud15c \uad6c\ud604\uae4c\uc9c0 \ub2e8\uacc4\ubcc4\ub85c \uc548\ub0b4\ud569\ub2c8\ub2e4. &hellip; \ub354 \ubcf4\uae30 \"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604\"","og_url":"https:\/\/atmokpo.com\/w\/39000\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-02T02:36:14+00:00","article_modified_time":"2024-11-26T06:42:41+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/39000\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/39000\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604","datePublished":"2024-11-02T02:36:14+00:00","dateModified":"2024-11-26T06:42:41+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/39000\/"},"wordCount":45,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["React\ud504\ub860\ud2b8\uc5d4\ub4dc"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/39000\/","url":"https:\/\/atmokpo.com\/w\/39000\/","name":"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-02T02:36:14+00:00","dateModified":"2024-11-26T06:42:41+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/39000\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/39000\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/39000\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"\ub9ac\uc561\ud2b8\ub85c \ud480\uc2a4\ud0dd \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uad6c\ucd95\ud558\uae30, JWT\ub97c \ud65c\uc6a9\ud55c \uc778\uc99d \uae30\ub2a5 \uad6c\ud604"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/39000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=39000"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/39000\/revisions"}],"predecessor-version":[{"id":39001,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/39000\/revisions\/39001"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=39000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=39000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=39000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}