inflearn logo
Course

Course

Instructor

rkddus's Posts

rkddus rkddus

@rkddus

Reviews Written
1
Average Rating
5.0

Posts 5

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; }, }), ], });

Likes
0
Comments
6
Viewcount
699

Q&A

비디오 상세페이지

선생님 어제 서버 문제였던거 같아요 오늘은 잘 되네요

Likes
0
Comments
1
Viewcount
289