{"id":26040254,"url":"https://github.com/nrobledosagredo/nextjs-cognito-auth","last_synced_at":"2026-04-18T22:04:41.939Z","repository":{"id":281085916,"uuid":"944117012","full_name":"nrobledosagredo/nextjs-cognito-auth","owner":"nrobledosagredo","description":"A Next.js application integrating with AWS Cognito for authentication.","archived":false,"fork":false,"pushed_at":"2025-03-06T22:13:25.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T23:22:20.850Z","etag":null,"topics":["authentication","cognito","nextjs"],"latest_commit_sha":null,"homepage":"","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/nrobledosagredo.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":"2025-03-06T20:14:34.000Z","updated_at":"2025-03-06T22:16:16.000Z","dependencies_parsed_at":"2025-03-06T23:33:10.397Z","dependency_job_id":null,"html_url":"https://github.com/nrobledosagredo/nextjs-cognito-auth","commit_stats":null,"previous_names":["nrobledosagredo/nextjs-cognito-auth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrobledosagredo%2Fnextjs-cognito-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrobledosagredo%2Fnextjs-cognito-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrobledosagredo%2Fnextjs-cognito-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrobledosagredo%2Fnextjs-cognito-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nrobledosagredo","download_url":"https://codeload.github.com/nrobledosagredo/nextjs-cognito-auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242386700,"owners_count":20119573,"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":["authentication","cognito","nextjs"],"created_at":"2025-03-07T12:08:50.349Z","updated_at":"2026-04-18T22:04:41.930Z","avatar_url":"https://github.com/nrobledosagredo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js with AWS Cognito Authentication\n![Typescript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![NextJS](https://img.shields.io/badge/next%20js-000000?style=for-the-badge\u0026logo=nextdotjs\u0026logoColor=white)\n![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-38B2AC?style=for-the-badge\u0026logo=tailwind-css\u0026logoColor=white)\n![shadcn/ui](https://img.shields.io/badge/shadcn%2Fui-000000?style=for-the-badge\u0026logo=shadcnui\u0026logoColor=white)\n![Amazon AWS](https://img.shields.io/badge/Amazon_AWS-FF9900?style=for-the-badge\u0026logo=amazonaws\u0026logoColor=white)\n![Prettier](https://img.shields.io/badge/prettier-1A2C34?style=for-the-badge\u0026logo=prettier\u0026logoColor=F7BA3E)\n![Zod](https://img.shields.io/badge/Zod-000000?style=for-the-badge\u0026logo=zod\u0026logoColor=3068B7)\n\n## Overview\n\nImplementation of AWS Cognito authentication in a Next.js application.\n\nUses AWS Amplify to simplify integration with Cognito services. Users can sign up, sign in, and log out while utilizing Cognito as the authentication provider.\n\n## Features\n\n- **User authentication**: Sign up, sign in, and log out functionalities powered by AWS Cognito.\n- **Secure sessions**: Automatically manage user sessions using **AWS Amplify**.\n- **Cognito user pool**: Integration with a Cognito user pool for authentication.\n- **Protected routes**: Ensures that only authenticated users can access specific pages.\n\n## Setup\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/your-username/nextjs-cognito-auth.git\n   cd nextjs-cognito-auth\n   ```\n\n2. **Install dependencies:**\n\n   ```bash\n   npm install\n   ```\n\n3. **Configure AWS Cognito:**\n\n   Set up a Cognito user pool and app client in the [Cognito Console](https://console.aws.amazon.com/cognito). Note down the **User Pool ID** and **App Client ID**.\n\n4. **Add environment variables:**\n\n   In the root of your project, create a `.env.local` file and add the following:\n\n   ```bash\n   NEXT_PUBLIC_COGNITO_USER_POOL_ID=your_user_pool_id\n   NEXT_PUBLIC_COGNITO_CLIENT_ID=your_app_client_id\n   NEXT_PUBLIC_COGNITO_REGION=your_aws_region\n   ```\n\n5. **Run the application:**\n\n   ```bash\n   npm run dev\n   ```\n\n   Visit `http://localhost:3000` in your browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrobledosagredo%2Fnextjs-cognito-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnrobledosagredo%2Fnextjs-cognito-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrobledosagredo%2Fnextjs-cognito-auth/lists"}