NextAuth
ํ์ตํค์๋
์ค์น ๋ฐ ์ธํ
Next Auth
์ค์น ๋ฐ ์ธํ
Next14 ๋ฒ์ ์ ํ์ฌ ํธํ์ฑ ๋ฌธ์ ์์ (24.06.13 ๊ธฐ์ค)
๐ ๊ณต์๋ฌธ์ ์ฐธ๊ณ
npm install next-auth@betaํฐ๋ฏธ๋์ ์
๋ ฅํด์ ๋์จ ๋ฌธ์๋ฅผ ํ๊ฒฝ๋ณ์๋ก ์ง์
openssl rand -base64 33AUTH_SECRET= ํ๊ฒฝ๋ณ์์ง์ src/auth.ts
import NextAuth from 'next-auth';
export const { handlers, signIn, signOut, auth } = NextAuth({
providers: [],
});app/api/auth/[...nextauth]/route.ts
src/middleware.ts
๐จ ๋ฐฐํฌ๋ฅผ ์ํด bulid ํ๋ฉด ํด๋น ํ์ผ error
ํด๋น ์ฝ๋๋ฅผ ์ฌ์ฉ๋ก ๋ณ๊ฒฝ ํด์ผํจ
Last updated