whgpwls2103175
@whgpwls2103175
Reviews Written
-
Average Rating
-
Posts
Q&A
credentials provider ์์ ์๋ฒ๋ก ๋ถํฐ ๋ฐ์์จ error message๊ฐ ๋ฐํ๋์ง ์๋ ๊ฒฝ์ฐ
๊ทธ๋ ๊ตฐ์ ใ ใ ๋ต๋ณ๊ฐ์ฌํฉ๋๋ค...!
- 0
- 5
- 953
Q&A
credentials provider ์์ ์๋ฒ๋ก ๋ถํฐ ๋ฐ์์จ error message๊ฐ ๋ฐํ๋์ง ์๋ ๊ฒฝ์ฐ
์ด๊ฒ ๋ณด์ ๋๋ฌธ์ ์ปค์คํ ์ค๋ฅ๋ฉ์์ง ๋ฐํ์ด ๋ถ๊ฐ๋ฅํ ๊ฑด๊ฐ ์ถ๊ธฐ๋ ํด์ 0-0 ์ฐพ์๋ณด๋ app router์์๋ง ๋ฐ์ํ๋ ๋ฌธ์ ๊ฐ๊ธฐ๋ ํ๊ตฌ์..https://github.com/nextauthjs/next-auth/issues/7638#issuecomment-1599319687 ์ด๋ฐ ๋ฐฉ์์ผ๋ก ํด๊ฒฐํ๋ ๊ฒ ๊ฐ๊ธดํ๋ฐ.. ํ์คํ์ง๊ฐ ์๋ค์ฉ ใ ใ ์์ด๋ ๋๋ ๋น๋ฐ๋ฒํธ๊ฐ ํ๋ ธ์ ๋ return null๋ก ์ค์ ํด์ฃผ๋ฉด client์์ signIn response๋ก {error: 'CredentialsSignin', status: 200, ok: true, url: null} ๋ฅผ ํ์ธํ ์ ๋ ์์ต๋๋ค. throw Error๋ฅผ ํ๋ฉด {error: 'CallbackRouteError', status: 200, ok: true, url: null} ๋ก ๋ฐํ๋๋๋ผ๊ตฌ์.์ ์์ ์ผ๋ก ๋ก๊ทธ์ธ์ ํ๋ฉด response๋ก {error: null, status: 200, ok: true, url: 'http://localhost:3000/login'}๊ฐ ๋ฐํ๋ฉ๋๋ค.๊ทธ๋ฆฌ๊ณ ์ค์ ๋ก response์ error๊ฐ null ์ผ๋๋ง ์ฟ ํค์ authjs.session-token์ด ์์ฑ๋๊ธฐ ๋๋ฌธ์ (์ฆ client signIn์์ฒญ์ response์ error๊ฐ null์ด ์๋๋ฉด ๋ก๊ทธ์ธ์ด ๋์ง ์์์) ์ฐ์ ์ ์๋์ฒ๋ผ ์ฝ๋๋ฅผ ๊ตฌํํด ๋์์ต๋๋ค.(์ฌ์ง)
- 0
- 5
- 953
Q&A
credentials provider ์์ ์๋ฒ๋ก ๋ถํฐ ๋ฐ์์จ error message๊ฐ ๋ฐํ๋์ง ์๋ ๊ฒฝ์ฐ
๋ต๋ณ ๊ฐ์ฌํฉ๋๋ค!ใ ใ ์๋ํด๋ดค๋๋ฐ ํฐ๋ฏธ๋์์๋ง ์๋ฌ๊ฐ ํ์ธ๋๊ณ .. ๋ก๊ทธ์ธ ์ฐฝ ๋ธ๋ผ์ฐ์ ์ฝ์ ๋ก๊ทธ์์๋ ์ฌ์ ํ response๋ก {error: 'CallbackRouteError', status: 200, ok: true, url: null} ๋ฐํ๋๊ณ ์์ต๋๋ค.
- 0
- 5
- 953
Q&A
login ์ http://localhost:9090/api/auth/error?error=CallbackRouteError๋ก ๋ฆฌํด
handlers.tsx์์ http.post("/api/login) ์์ฒญ์ HttpResponse๋ก ์ฃผ๋ User[1]์ User[0]์ผ๋ก ์์ ํ๊ฑฐ๋ nickname์ ์์ด๋ก ๋ณ๊ฒฝํ๋ ์ ์์๋ํฉ๋๋ค. ํ๊ธ ๋๋ค์์ด ํฌํจ๋ User[1]๋ก response ํ ์์๋ console.log(authResponse)๊ฐ null๋ก ๋์ค๋ฉด์ ๋์ผํ CallbackRouteError๋ฐ์ํ๋ค์..! ํ๊ธ ๋ฐ์ดํฐ๋ก ์๋ต๋ ๊ฐ๋ฅํ๊ฒ ํ๋ ค๋ฉด ์ถ๊ฐ ์ค์ ์ด ํ์ํ๊ฑธ๊น์...?
- 0
- 4
- 903
Q&A
login ์ http://localhost:9090/api/auth/error?error=CallbackRouteError๋ก ๋ฆฌํด
(์ฌ์ง)auth.ts๋ ๊ฐ์ ๋ด์ฉ๊ณผ ๋์ผํ๊ฒ ์ค์ ๋์ด์๊ณ ,(์ฌ์ง)api/auth/[...nextauth]/route.ts๋ ๋์ผํ๊ตฌ์.(์ฌ์ง)๋ก๊ทธ์ธ ํธ์ถํ ๋ console.log()๋ ์ ์ฐํ๋๋ฐ ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ ์ด์ ๋ฅผ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค.ใ .ใ
- 0
- 4
- 903
Q&A
sever Actions ์ฌ์ฉํ๊ธฐ ๊ฐ์ข ์ค ํ์๊ฐ์ ์์ post ์์ฒญ ์๋ต์๋ ์ค๋ฅ
lsof -i tcp:9090 ์ ๋ ฅํ์ ๋ ์๋ฌด๋ฐ ๊ฐ์ด ์กฐํ๋์ง ์์ต๋๋คใ ใ (์ฌ์ง)
- 0
- 2
- 515




