{"id":21817907,"url":"https://github.com/iansu/vercel-middleware-auth-demo","last_synced_at":"2026-05-18T03:04:08.911Z","repository":{"id":70310059,"uuid":"536742858","full_name":"iansu/vercel-middleware-auth-demo","owner":"iansu","description":"An example that shows how you can use Vercel Middleware to control access to an app","archived":false,"fork":false,"pushed_at":"2022-09-14T21:10:16.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-26T01:27:39.632Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"vercel-middleware-auth-demo.vercel.app","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/iansu.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":"2022-09-14T20:07:54.000Z","updated_at":"2022-11-01T09:08:26.000Z","dependencies_parsed_at":"2023-02-27T05:00:20.498Z","dependency_job_id":null,"html_url":"https://github.com/iansu/vercel-middleware-auth-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iansu/vercel-middleware-auth-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansu%2Fvercel-middleware-auth-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansu%2Fvercel-middleware-auth-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansu%2Fvercel-middleware-auth-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansu%2Fvercel-middleware-auth-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iansu","download_url":"https://codeload.github.com/iansu/vercel-middleware-auth-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iansu%2Fvercel-middleware-auth-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003182,"owners_count":26083533,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2024-11-27T15:49:00.705Z","updated_at":"2025-10-10T07:45:07.676Z","avatar_url":"https://github.com/iansu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vercel Middleware Auth Demo\n\nAn example that shows how you can use [Vercel Middleware](https://nextjs.org/docs/advanced-features/middleware) to control access to an app\n\n\u003e **Warning**\n\u003e This only provides limited protection and it's easy for users to duplicate the auth cookie. Make sure you understand the risks and tradeoffs before using this in a production application.\n\nThis repo includes two apps:\n\n- [Dashboard](./apps/dashboard): An app that you want to password protect\n- [Auth](./apps/auth): An app that takes a password and sets a cookie to grant access to the dashboard\n\n## Demo\n\n[https://dashboard.vercel-middleware-auth-demo.iansutherland.dev](https://dashboard.vercel-middleware-auth-demo.iansutherland.dev)\n\nYou should be asked to login and then redirected back to the dashboard app. You can login with the passwords `password` and `secret`.\n\n## Development\n\n1. Run `npm install`\n1. In one terminal window run `npm start -w auth`\n1. In another terminal window run `npm start -w dashboard`\n1. Go to [http://localhost:3000](http://localhost:3000)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiansu%2Fvercel-middleware-auth-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiansu%2Fvercel-middleware-auth-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiansu%2Fvercel-middleware-auth-demo/lists"}