Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Feat ] 인증 시스템 초기 세팅 및 login api 적용 #178

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/cd-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- name: Set environment variables for build
run: |
echo "NEXT_PUBLIC_HOST=${{ secrets.NEXT_PUBLIC_HOST }}" >> .env.local
echo "AUTH_SECRET=${{ secrets.AUTH_SECRET }}" >> .env.local

- name: Install Dependencies
if: steps.cache-node.outputs.cache-hit != 'true'
Expand Down
141 changes: 0 additions & 141 deletions .storybook/DocsPage.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions .storybook/decorators.tsx

This file was deleted.

112 changes: 0 additions & 112 deletions .storybook/main.ts

This file was deleted.

36 changes: 0 additions & 36 deletions .storybook/preview.ts

This file was deleted.

25 changes: 0 additions & 25 deletions .storybook/viewport.ts

This file was deleted.

27 changes: 27 additions & 0 deletions next-auth.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { User } from "next-auth";
import "next-auth/jwt";

interface AdapterUser extends User {
id: string;
email: string;
emailVerified: Date | null;
}
/**
* auth.ts에서 정의한 session과 token의 타입을 확장
* https://authjs.dev/getting-started/typescript#module-augmentation
*/
declare module "next-auth" {
interface Session {
accessToken: string;
}
interface User {
accessToken: string;
}
}

declare module "next-auth/jwt" {
interface JWT {
user: User & AdapterUser;
accessToken: string;
}
}
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const nextConfig = {
}
]
},
reactStrictMode: false,
webpack(config) {
// SVG imports를 처리하는 기존 규칙 가져오기
const fileLoaderRule = config.module.rules.find((rule) =>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"ky": "^1.7.2",
"lottie-react": "^2.4.0",
"next": "14.2.8",
"next-auth": "5.0.0-beta.25",
"prism-themes": "^1.9.0",
"prismjs": "^1.29.0",
"react": "^18",
Expand Down Expand Up @@ -70,4 +71,4 @@
"storybook-dark-mode": "^4.0.2",
"typescript": "^5"
}
}
}
Loading
Loading