{"id":13431408,"url":"https://github.com/dabit3/next.js-authentication-aws","last_synced_at":"2025-11-17T15:11:12.339Z","repository":{"id":73191371,"uuid":"297323301","full_name":"dabit3/next.js-authentication-aws","owner":"dabit3","description":"This project deploys a Next.js project to AWS with comprehensive authentication enabled","archived":false,"fork":false,"pushed_at":"2020-10-21T03:21:51.000Z","size":229,"stargazers_count":106,"open_issues_count":1,"forks_count":17,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T23:42:09.974Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/dabit3.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}},"created_at":"2020-09-21T11:48:19.000Z","updated_at":"2025-07-27T22:02:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc5867d8-4cb5-472a-8f1e-570a6d704647","html_url":"https://github.com/dabit3/next.js-authentication-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dabit3/next.js-authentication-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabit3%2Fnext.js-authentication-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabit3%2Fnext.js-authentication-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabit3%2Fnext.js-authentication-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabit3%2Fnext.js-authentication-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dabit3","download_url":"https://codeload.github.com/dabit3/next.js-authentication-aws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabit3%2Fnext.js-authentication-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284903928,"owners_count":27082141,"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-11-17T02:00:06.431Z","response_time":55,"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-07-31T02:01:02.894Z","updated_at":"2025-11-17T15:11:12.320Z","avatar_url":"https://github.com/dabit3.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Next.js authentication with AWS\n\n\u003e This code goes along with my tutorial [The complete Guide to Authentication with Next.js and AWS](https://dev.to/dabit3/the-complete-guide-to-next-js-authentication-2aco)\n\n![](header.jpg)\n\nThis project contains an end to end solution for Next.js authentication on AWS with AWS Amplify.\n\n1. Client authentication\n2. Accessing the user session on the client\n3. Protected client routes\n4. Client-side redirects\n5. Accessing the user session in a server-side route (getServerSideProps)\n6. Protected server routes (getServerSideProps)\n7. Server-side redirects (getServerSideProps)\n8. Accessing the user session in an API route\n9. Deploying the app using the Next.js Serverless Component\n\n### To deploy the authentication service and run the app, follow these steps:\n\n1. Clone the repo\n\n```sh\ngit clone https://github.com/dabit3/next.js-authentication-aws.git\n```\n\n2. Change into the directory and install the dependencies\n\n```sh\ncd next.js-authentication-aws\n\nnpm install\n```\n\n3. Initialize the Amplify project\n\n```sh\namplify init\n```\n\n4. Deploy the authentication service\n\n```sh\namplify push --y\n```\n\n5. Run the app locally\n\n```sh\nnpm run dev\n```\n\n## Deploying with Serverless Framework\n\n```sh\nnpx serverless\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabit3%2Fnext.js-authentication-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdabit3%2Fnext.js-authentication-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabit3%2Fnext.js-authentication-aws/lists"}