rkddus
@rkddus
Reviews Written
1
Average Rating
5.0
Posts
Q&A
Cannot read properties of undefined (reading 'substring')
์ ์๋ api/auth/signin ์ผ๋ก ๊ฐ๋ฉด ํด๋น ์๋ฌ๊ฐ ๋์ต๋(์ฌ์ง)๋ค
- 0
- 6
- 636
Q&A
Cannot read properties of undefined (reading 'substring')
import NextAuth from "next-auth"; import CredentialsProvider from "next-auth/providers/credentials"; export const { handlers: { GET, POST }, auth, signIn, } = NextAuth({ pages: { signIn: "/i/flow/login", newUser: "/i/flow/signup", }, providers: [ CredentialsProvider({ name: "Credentials", credentials: { username: { label: "Username", type: "text", placeholder: "Username" }, password: { label: "Password", type: "password", placeholder: "Password", }, }, async authorize(credentials) { const authResponse = await fetch( `${process.env.NEXT_PUBLIC_BASE_URL}/api/login`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ id: credentials?.username, password: credentials?.password, }), } ); if (!authResponse.ok) { return null; } const user = await authResponse.json(); return user; }, }), ], });
- 0
- 6
- 636
Q&A
Cannot read properties of undefined (reading 'substring')
(์ฌ์ง)middleware๊ฐ ๋ณด์ฌ์ ๋จ๊ฒจ๋ด ๋๋ค
- 0
- 6
- 636
Q&A
Cannot read properties of undefined (reading 'substring')
(์ฌ์ง)
- 0
- 6
- 636
Q&A
๋น๋์ค ์์ธํ์ด์ง
์ ์๋ ์ด์ ์๋ฒ ๋ฌธ์ ์๋๊ฑฐ ๊ฐ์์ ์ค๋์ ์ ๋๋ค์
- 0
- 1
- 250




