| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Invoke | /inspector:auth |
| Category | kobic-development |
| Complexity | simple |
| MCP Servers | flutter-inspector |
/inspector:auth โ ๋ก๊ทธ์ธ ์ํ ์ ๊ฒ๊ธฐ#
ํ๋ง๋๋ก#
์คํ ์ค์ธ ์ฑ์ด "์ง๊ธ ๋ก๊ทธ์ธ์ด ์ ๋๋ก ๋์ด ์๋์ง, ์ถ์ ์ฆ(ํ ํฐ)์ด ์ด์ ์๋์ง"๋ฅผ ์ค์๊ฐ์ผ๋ก ๋ค์ฌ๋ค๋ณด๋ ์ ๊ฒ ๋๊ตฌ์ ๋๋ค. ๊ฑด๋ฌผ ์ถ์ ๊ฒ์ดํธ์์ ๋ฐฉ๋ฌธ์ฆ์ด ์ ํจํ์ง, ์ธ์ ๋ง๋ฃ๋๋์ง ํ์ธํด ์ฃผ๋ ์๋ด ๋ฐ์คํฌ๋ผ๊ณ ๋ณด๋ฉด ๋ฉ๋๋ค.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ๋ก๊ทธ์ธ์ด ์ ๋๊ฑฐ๋ ์๊พธ ํ๋ฆด ๋
- "401 ๊ถํ ์์" ๊ฐ์ ์ธ์ฆ ์ค๋ฅ๊ฐ ๋ ๋
- ํ ํฐ(์ถ์ ์ฆ)์ด ๋ง๋ฃ๋๋์ง, ์ฌ์ฉ์ ๊ถํ์ด ์ถฉ๋ถํ์ง ํ์ธํ๊ณ ์ถ์ ๋
์ฃผ๋ก ๊ฐ๋ฐ์๋ AI ์์ด์ ํธ๊ฐ ์ฑ ๋์ ์ค์ ์ธ์ฆ ๊ด๋ จ ๋ฌธ์ ๋ฅผ ์ง๋จํ ๋ ์ฌ์ฉํฉ๋๋ค.
๋ฌด์์ ํด์ฃผ๋์#
์คํ ์ค์ธ ์ฑ์ ์ง์ ๋ฌผ์ด๋ด์ ๋ ๊ฐ์ง ์ ๋ณด๋ฅผ ์๋ ค ์ค๋๋ค.
-
์ธ์ฆ ์ํ(
auth_get_status) โ ๋ก๊ทธ์ธ ์ฌ๋ถ, ๋ก๊ทธ์ธ ๋ฐฉ์, ๊ทธ๋ฆฌ๊ณ access/refresh ํ ํฐ์ด ์ด์ ์๋์งยท์ธ์ ๋ง๋ฃ๋๋์ง - ์ฌ์ฉ์ ์ ๋ณด(
auth_get_user) โ ํ์ฌ ๋ก๊ทธ์ธํ ์ฌ์ฉ์์ ID, ์ด๋ฉ์ผ, ์ด๋ฆ, ๊ถํ(roles)
์ด๋ป๊ฒ ์ฐ๋์#
/inspector/auth status
/inspector/auth user
/inspector/auth token
statusโ ์ง๊ธ ๋ก๊ทธ์ธ๋์ด ์๋์ง ์ ์ฒด ์ธ์ฆ ์ํ๋ฅผ ํ์ธํฉ๋๋ค.userโ ํ์ฌ ๋ก๊ทธ์ธํ ์ฌ์ฉ์๊ฐ ๋๊ตฌ์ธ์ง(๊ถํ ํฌํจ) ํ์ธํฉ๋๋ค.tokenโ ์ถ์ ์ฆ(ํ ํฐ)์ด ์ธ์ ๋ง๋ฃ๋๋์ง ๋ฑ ํ ํฐ ์ํ๋ฅผ ์์ธํ ํ์ธํฉ๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
๋ฌธ์ ์ ํ๋ณ๋ก ์ ํด์ง ์์๋๋ก ์์ธ์ ์ขํ ๊ฐ๋๋ค.
- ๋ก๊ทธ์ธ์ด ์ ๋ ๋ โ ์ธ์ฆ ์ํ๋ฅผ ํ์ธํ๊ณ , ํ ํฐ ์ํ๋ฅผ ๋ณธ ๋ค, ๋ก๊ทธ์ธ ํ๋ฆ์ ์ ๊ฒํฉ๋๋ค.
- 401 ๊ถํ ์ค๋ฅ โ ํ ํฐ์ด ๋ง๋ฃ๋๋์ง, refresh ํ ํฐ์ ์ด์ ์๋์ง ๋ณด๊ณ , ํ ํฐ ๊ฐฑ์ ๋ก์ง์ ์ ๊ฒํฉ๋๋ค.
- ๊ถํ ๋ถ์กฑ ์ค๋ฅ โ ์ฌ์ฉ์์ ๊ถํ(roles)์ ํ์ธํด ํ์ํ ๊ถํ๊ณผ ๋น๊ตํ๊ณ , ๊ถํ ์ฒดํฌ ๋ก์ง์ ์ ๊ฒํฉ๋๋ค.
- ์๋ ๋ก๊ทธ์์ โ ํ ํฐ ๋ง๋ฃ ์์ ๊ณผ ์ธ์ ํ์์์ ์ค์ ์ ํ์ธํ๊ณ , ํ ํฐ ๊ฐฑ์ ํ์ด๋ฐ์ ์ ๊ฒํฉ๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Triggers#
- Login issues
- Token expiration issues
- Authentication state check
MCP Tools#
auth_get_status#
Returns the current authentication status.
Response example:
{
" isAuthenticated " : true,
" authMethod " : " email " ,
" tokenStatus " : {
" accessToken " : {
" exists " : true,
" expiresAt " : " 2024-01-01T12:00:00Z " ,
" isExpired " : false,
" expiresIn " : " 45 minutes "
},
" refreshToken " : {
" exists " : true,
" expiresAt " : " 2024-01-08T10:00:00Z " ,
" isExpired " : false
}
}
}auth_get_user#
Returns the currently logged-in user information.
Response example:
{
" user " : {
" id " : 123,
" email " : " user@example.com " ,
" name " : " Hong Gildong " ,
" roles " : [ " user " , " premium " ],
" createdAt " : " 2023-06-15T10:00:00Z "
}
}Common Diagnostics#
Cannot log in#
1. auth_get_status - > Check authentication status
2. Verify tokenStatus
3. Review login flow401 Unauthorized error#
1. auth_get_status - > Check token expiration
2. Check refreshToken status
3. Review token renewal logicInsufficient permissions error#
1. auth_get_user - > Check user roles
2. Compare with required permissions
3. Review permission check logicAutomatic logout issue#
1. auth_get_status - > Check token expiration time
2. Check session timeout settings
3. Review token renewal timingExamples#
Check authentication status#
/inspector/auth statusCheck user info#
/inspector/auth userDetailed token status check#
/inspector/auth tokenReferences#
- Detailed implementation:
.claude/agents/flutter-inspector-auth.md - Master inspector:
.claude/commands/inspector.md - Network inspector:
.claude/commands/inspector/network.md