{"id":30810541,"url":"https://github.com/hazelnutparadise/account-center","last_synced_at":"2026-02-13T16:08:43.839Z","repository":{"id":270441283,"uuid":"910362540","full_name":"HazelnutParadise/account-center","owner":"HazelnutParadise","description":"A Next.js project for user account management with Logto authentication.","archived":false,"fork":false,"pushed_at":"2025-12-22T10:35:00.000Z","size":2041,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T13:48:01.168Z","etag":null,"topics":["account","logto"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HazelnutParadise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-31T04:41:42.000Z","updated_at":"2025-12-22T10:35:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"b96a9670-d052-4398-af42-635db37c7cff","html_url":"https://github.com/HazelnutParadise/account-center","commit_stats":null,"previous_names":["hazelnutparadise/account","hazelnutparadise/account-center"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HazelnutParadise/account-center","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HazelnutParadise%2Faccount-center","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HazelnutParadise%2Faccount-center/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HazelnutParadise%2Faccount-center/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HazelnutParadise%2Faccount-center/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HazelnutParadise","download_url":"https://codeload.github.com/HazelnutParadise/account-center/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HazelnutParadise%2Faccount-center/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29411935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["account","logto"],"created_at":"2025-09-06T05:50:28.632Z","updated_at":"2026-02-13T16:08:43.830Z","avatar_url":"https://github.com/HazelnutParadise.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Account Center\n\n榛果繽紛樂的帳號中心\n\n網址: [https://account.hazelnut-paradise.com](https://account.hazelnut-paradise.com)\n\n![logo](AccountCenter.png)\n\nThis is a [Next.js](https://nextjs.org) project for user account management with [Logto](https://logto.io) authentication.\n\n## Features\n\n- 🔐 **User Authentication**: Login/logout with Logto\n- 👤 **Profile Management**: Update user profile information\n- 🔒 **Security Settings**: Password management and social account connections\n- 🌐 **Social Login**: Connect/disconnect Google and GitHub accounts\n- 📱 **Responsive Design**: Works on desktop and mobile devices\n- 🌙 **Dark Mode**: Full dark mode support\n\n## Social Account Connection\n\nThis application supports connecting your account with:\n- **Google**: Connect your Google account for quick login\n- **GitHub**: Connect your GitHub account for quick login\n\n### How it works:\n1. Users can connect their social accounts in the Security settings\n2. Once connected, they can use these accounts for quick login\n\n## Getting Started\n\n### Prerequisites\n\n1. A Logto instance (Cloud or self-hosted)\n2. A Logto application configured with:\n   - Standard web application type\n   - Proper redirect URIs\n   - Social connectors (if you want social login)\n\n### Environment Variables\n\nCopy `.env.example` to `.env.local` and fill in your Logto configuration:\n\n```bash\ncp .env.example .env.local\n```\n\nRequired variables:\n- `LOGTO_ENDPOINT`: Your Logto endpoint URL\n- `LOGTO_APP_ID`: Your Logto application ID\n- `LOGTO_APP_SECRET`: Your Logto application secret\n- `LOGTO_COOKIE_SECRET`: A random secret for cookies (at least 32 characters)\n- `LOGTO_M2M_CLIENT_ID`: Machine-to-machine client ID for management API\n- `LOGTO_M2M_CLIENT_SECRET`: Machine-to-machine client secret\n- `BASE_URL_DEV`: Base URL for development (e.g., `http://localhost:3000`)\n- `BASE_URL_PROD`: Base URL for production (e.g., `https://your\n\nOptional (for social login):\n- `LOGTO_GITHUB_CONNECTOR_ID`: GitHub connector ID from Logto admin\n- `LOGTO_GOOGLE_CONNECTOR_ID`: Google connector ID from Logto admin\n\n### Installation\n\n```bash\n# Install dependencies\nbun install\n\n# Run development server\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n### Logto Configuration\n\n1. **Create a Logto Application**:\n   - Type: Traditional Web App\n   - Add redirect URI: `http://localhost:3000/api/logto/sign-in-callback`\n   - Add post sign-out redirect URI: `http://localhost:3000`\n\n2. **Create a Machine-to-Machine Application** (for Management API):\n   - Type: Machine-to-Machine\n   - Grant access to Logto Management API\n   - Add scopes: `all` or specific scopes as needed\n\n3. **Configure Social Connectors** (Optional):\n   - Set up Google connector in Logto admin\n   - Set up GitHub connector in Logto admin\n   - Note the connector IDs for your environment variables\n\n4. **Social Callback Configuration**:\n   - Add social callback URI: `http://localhost:3000/dashboard/profile/social/callback`\n\n## Project Structure\n\n```\napp/\n├── layout.tsx          # Root layout with authentication context\n├── page.tsx           # Home page\n├── logto.ts           # Logto configuration and API helpers\n├── dashboard/         # Protected dashboard pages\n│   ├── layout.tsx     # Dashboard layout\n│   ├── page.tsx       # Dashboard home\n│   ├── profile/       # Profile management\n│   └── security/      # Security settings with social connections\n└── components/        # Shared components\n```\n\n## API Routes\n\n- `/api/logto/sign-in-callback`: Logto sign-in callback\n- `/dashboard/security/social/callback`: Social account connection callback\n\n## Technologies Used\n\n- **Next.js 15**: React framework with App Router\n- **TypeScript**: Type-safe JavaScript\n- **Tailwind CSS**: Utility-first CSS framework\n- **Logto**: Authentication and user management\n- **Bun**: JavaScript runtime and package manager\n\n## Development\n\nThis project uses:\n- ESLint for code linting\n- TypeScript for type checking\n- Tailwind CSS for styling\n- Next.js App Router for routing\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nDon't forget to set up your environment variables in Vercel and update your Logto application redirect URIs to match your production domain.\n\n## Learn More\n\n- [Next.js Documentation](https://nextjs.org/docs)\n- [Logto Documentation](https://docs.logto.io/)\n- [Logto Next.js Integration](https://docs.logto.io/quick-starts/next-js/)\n\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazelnutparadise%2Faccount-center","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhazelnutparadise%2Faccount-center","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazelnutparadise%2Faccount-center/lists"}