{"id":21739317,"url":"https://github.com/cookyman74/iam_server","last_synced_at":"2026-05-18T02:35:22.325Z","repository":{"id":263973756,"uuid":"891602815","full_name":"cookyman74/iam_server","owner":"cookyman74","description":"IAM Server - 통합 OAuth 인증 서버 🌐 Google, Apple, Kakao, Naver와 같은 주요 OAuth 제공자와 통합된 인증 솔루션을 제공하는 강력한 NestJS 기반 백엔드 서버입니다. 안전한 인증 및 확장 가능한 구조를 지원합니다.","archived":false,"fork":false,"pushed_at":"2024-11-21T12:42:22.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T18:45:31.942Z","etag":null,"topics":["authentication","backend","jwt","nestjs","oauth2","prisma","security","typescript"],"latest_commit_sha":null,"homepage":"https://www.hell0world.net/05/00/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cookyman74.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-20T16:13:25.000Z","updated_at":"2024-11-22T14:54:29.000Z","dependencies_parsed_at":"2024-11-21T10:22:30.400Z","dependency_job_id":"059bac29-7e9f-41cd-94c2-69b5d3731b98","html_url":"https://github.com/cookyman74/iam_server","commit_stats":null,"previous_names":["cookyman74/iam_server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cookyman74/iam_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookyman74%2Fiam_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookyman74%2Fiam_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookyman74%2Fiam_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookyman74%2Fiam_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cookyman74","download_url":"https://codeload.github.com/cookyman74/iam_server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookyman74%2Fiam_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","backend","jwt","nestjs","oauth2","prisma","security","typescript"],"created_at":"2024-11-26T06:08:29.341Z","updated_at":"2026-05-18T02:35:22.305Z","avatar_url":"https://github.com/cookyman74.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IAM Server - Unified OAuth Authentication Solution 🌐\n\nA NestJS-based OAuth authentication service that supports Google, Kakao, Naver, and Apple OAuth providers. This service handles user authentication, token management, and user profile management.\n\n## Features\n- **OAuth Authentication**: Supports Google, Kakao, Naver, and Apple.\n- **JWT Token Management**: Access and refresh token generation and validation.\n- **User Management**: Automatically creates or updates users upon authentication.\n- **CSRF Protection**: Implements state parameter validation for secure requests.\n- **Modular Architecture**: Cleanly organized and easily extensible modules.\n\n---\n## Installation\n1. **Clone the repository**\n```bash\ngit clone https://github.com/\u003cyour-username\u003e/\u003cyour-repo-name\u003e.git\ncd \u003cyour-repo-name\u003e\n```\n\n2. **Install dependencies**\n```bash\nyarn install\n```\n\n3. **Configure environment variables**\n    - Create a `.env` file in the root directory and define the following variables\n```bash\nNODE_ENV=development\nPORT=3000\nAPI_PREFIX=api\nCORS_ENABLED=true\nCORS_ORIGINS=http://localhost:3000\n\n# Database\nDATABASE_URL=postgresql://\u003cusername\u003e:\u003cpassword\u003e@localhost:5432/\u003cdatabase_name\u003e\nDATABASE_MAX_CONNECTIONS=100\nDATABASE_SSL_ENABLED=false\n\n# JWT Configuration\nJWT_SECRET=your_jwt_secret\nJWT_ACCESS_EXPIRATION=15m\nJWT_REFRESH_EXPIRATION=7d\n\n# OAuth Providers\nKAKAO_CLIENT_ID=your_kakao_client_id\nKAKAO_CLIENT_SECRET=your_kakao_client_secret\nKAKAO_REDIRECT_URI=http://localhost:3000/auth/kakao/callback\n\nNAVER_CLIENT_ID=your_naver_client_id\nNAVER_CLIENT_SECRET=your_naver_client_secret\nNAVER_REDIRECT_URI=http://localhost:3000/auth/naver/callback\n\nAPPLE_CLIENT_ID=your_apple_client_id\nAPPLE_TEAM_ID=your_apple_team_id\nAPPLE_KEY_ID=your_apple_key_id\nAPPLE_PRIVATE_KEY=\"-----BEGIN PRIVATE KEY-----\\nYourPrivateKeyHere\\n-----END PRIVATE KEY-----\"\nAPPLE_REDIRECT_URI=http://localhost:3000/auth/apple/callback\n\nGOOGLE_CLIENT_ID=your_google_client_id\nGOOGLE_CLIENT_SECRET=your_google_client_secret\nGOOGLE_REDIRECT_URI=http://localhost:3000/auth/google/callback\n```\n\n4. **Run database migrations** (using Prisma)\n```bash\nnpx prisma migrate dev\n```\n\n5. **Start the server**\n```bash\nyarn start\n```\n\nThe server will be available at `http://localhost:3000`.\n\n---\n## API Endpoints\n\n### **Authentication**\n1. Get Authorization URL\n```http\nGET /auth/:provider/url\n```\n- **Path Parameters**: `provider` (google, kakao, naver, apple)\n- **Query Parameters**: `state` (optional)\n- **Response**: Authorization URL.\n\n1. Handle OAuth Callback\n```http\nGET /auth/:provider/callback\n```\n- **Path Parameters**: `provider` (google, kakao, naver, apple)\n- **Query Parameters**: `code`, `state` (optional)\n- **Response**: Access and refresh tokens.\n\n1. Get User Info\n```http\nGET /auth/user\n```\n- **Headers**: `Authorization: Bearer \u003caccess_token\u003e`\n- **Response**: Authenticated user information.\n\n1. Refresh Tokens\n```http\nPOST /auth/refresh\n```\n-  **Headers**: `Authorization: Bearer \u003crefresh_token\u003e`\n- **Response**: New access and refresh tokens.\n\n---\n## Project Structure\nApp\n```bash\nsrc/\n├── auth/                 # Authentication module\n│   ├── controllers/      # Controllers for handling requests\n│   ├── decorators/       # Custom decorators\n│   ├── dto/              # Data Transfer Objects\n│   ├── enums/            # Enums for providers and constants\n│   ├── guards/           # Authorization guards\n│   ├── strategies/       # OAuth provider strategies\n│   ├── auth.module.ts    # Auth module definition\n│   ├── auth.service.ts   # Auth business logic\n├── users/                # User management module\n├── common/               # Shared utilities and interceptors\n├── prisma/               # Prisma database configuration\n├── main.ts               # Application entry point\n```\n\nconfiguration\n```bash\n/\n├── .env.development             # 개발 환경 변수\n├── .env.production             # 운영 환경 변수\n├── .env.test                   # 테스트 환경 변수\n│\n├── package.json                # 프로젝트 의존성\n├── tsconfig.json              # TypeScript 설정\n│\n├── Dockerfile                 # Docker 빌드 설정\n├── docker-compose.yml         # Docker 컨테이너 구성\n└── docker-compose.dev.yml     # 개발용 Docker 구성\n```\n\n--- \n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new feature branch.\n3. Commit your changes and push to your fork.\n4. Create a pull request to the main branch of this repository.\n\n# LICENSE\n\nCopyright (c) 2024 [Justin Jang, cookyman]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\n1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n2. If you modify or redistribute this Software, you must retain this license in your project and acknowledge the original author in any derivative works.\n3. This Software is provided \"as is\", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.\n\n**Additional Terms**:\n\n- The original author retains all moral rights to the code.\n- Any modifications to the Software that are publicly distributed must include attribution to the original author.\n- The software may not be used for purposes that violate applicable laws or ethical standards, including but not limited to abuse or harm.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcookyman74%2Fiam_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcookyman74%2Fiam_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcookyman74%2Fiam_server/lists"}