{"id":28199088,"url":"https://github.com/alexchantastic/next-password-protect-example","last_synced_at":"2025-05-16T18:15:18.524Z","repository":{"id":222036431,"uuid":"754875407","full_name":"alexchantastic/next-password-protect-example","owner":"alexchantastic","description":"An example Next.js project with password protected routes","archived":false,"fork":false,"pushed_at":"2024-11-07T08:11:58.000Z","size":123,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-07T09:21:42.673Z","etag":null,"topics":["app-router","auth","next","nextjs","password","password-protect","react-server-components","rsc"],"latest_commit_sha":null,"homepage":"https://codesandbox.io/p/devbox/github/alexchantastic/next-password-protect-example/tree/main/","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/alexchantastic.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}},"created_at":"2024-02-08T23:29:59.000Z","updated_at":"2024-09-21T18:12:14.000Z","dependencies_parsed_at":"2024-02-11T23:22:29.422Z","dependency_job_id":"3b0a064f-2740-4cc4-9d8b-91db276fd37f","html_url":"https://github.com/alexchantastic/next-password-protect-example","commit_stats":null,"previous_names":["alexchantastic/next-password-protect-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexchantastic%2Fnext-password-protect-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexchantastic%2Fnext-password-protect-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexchantastic%2Fnext-password-protect-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexchantastic%2Fnext-password-protect-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexchantastic","download_url":"https://codeload.github.com/alexchantastic/next-password-protect-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582926,"owners_count":22095520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["app-router","auth","next","nextjs","password","password-protect","react-server-components","rsc"],"created_at":"2025-05-16T18:15:12.879Z","updated_at":"2025-05-16T18:15:18.518Z","avatar_url":"https://github.com/alexchantastic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-password-protect-example\n\nThis is an example project that demonstrates how to password protect routes with [Next.js](https://nextjs.org/) (App Router) and [iron-session](https://github.com/vvo/iron-session).\n\nRead the full walkthrough at [https://www.alexchantastic.com/revisiting-password-protecting-next](https://www.alexchantastic.com/revisiting-password-protecting-next).\n\n## Setup\n\nClone the repository:\n\n```sh\ngit clone git@github.com:alexchantastic/next-password-protect-example.git\n```\n\nChange directories into the project and install dependencies:\n\n```sh\ncd next-password-protect-example\nnpm install\n```\n\nCreate an `.env.local` file:\n\n```\nIRON_SESSION_SECRET=\"replace_with_your_secret\" # Must be at least 32 characters\nIRON_SESSION_PASSWORD=\"replace_with_your_password\"\n```\n\n## Usage\n\nRun the development server:\n\n```sh\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser.\n\n## Project structure\n\n```\nsrc/\n└── app/\n    ├── api/\n    ├── middleware-protected/\n    │   └── nested-middleware-protected/\n    ├── protected/\n    ├── sign-in/\n    └── unprotected/\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexchantastic%2Fnext-password-protect-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexchantastic%2Fnext-password-protect-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexchantastic%2Fnext-password-protect-example/lists"}