{"id":28228013,"url":"https://github.com/shakibsadman/next-auth-v5","last_synced_at":"2026-04-09T01:32:09.551Z","repository":{"id":243776974,"uuid":"762757254","full_name":"shakibsadman/next-auth-v5","owner":"shakibsadman","description":"Next-Auth version 5, with Postgres and Prisma","archived":false,"fork":false,"pushed_at":"2024-06-11T03:41:42.000Z","size":195,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-30T17:17:17.253Z","etag":null,"topics":["authentication","next-auth","nextjs","postgresql","prisma","react","saas","zod"],"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/shakibsadman.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-24T15:56:58.000Z","updated_at":"2024-09-26T12:04:12.000Z","dependencies_parsed_at":"2024-06-11T04:57:49.591Z","dependency_job_id":null,"html_url":"https://github.com/shakibsadman/next-auth-v5","commit_stats":null,"previous_names":["shadmanshakib/next-auth-v5","shakibsadman/next-auth-v5"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shakibsadman/next-auth-v5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibsadman%2Fnext-auth-v5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibsadman%2Fnext-auth-v5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibsadman%2Fnext-auth-v5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibsadman%2Fnext-auth-v5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakibsadman","download_url":"https://codeload.github.com/shakibsadman/next-auth-v5/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibsadman%2Fnext-auth-v5/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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":["authentication","next-auth","nextjs","postgresql","prisma","react","saas","zod"],"created_at":"2025-05-18T14:09:15.084Z","updated_at":"2026-04-09T01:32:09.525Z","avatar_url":"https://github.com/shakibsadman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next Auth v5 - Advanced Guide (2024)\n\n![image](https://github.com/AntonioErdeljac/next-auth-v5-advanced-guide/assets/23248726/d0175397-8c3f-4e82-91c4-78c14f29bb81)\n\nThis is a repository for Next Auth v5 - Advanced Guide (2024)\n\n[VIDEO TUTORIAL](https://youtu.be/1MTyCvS05V4)\n\nKey Features:\n- 🔐 Next-auth v5 (Auth.js)\n- 🚀 Next.js 14 with server actions\n- 🔑 Credentials Provider\n- 🌐 OAuth Provider (Social login with Google \u0026 GitHub)\n- 🔒 Forgot password functionality\n- ✉️ Email verification\n- 📱 Two factor verification\n- 👥 User roles (Admin \u0026 User)\n- 🔓 Login component (Opens in redirect or modal)\n- 📝 Register component\n- 🤔 Forgot password component\n- ✅ Verification component\n- ⚠️ Error component\n- 🔘 Login button\n- 🚪 Logout button\n- 🚧 Role Gate\n- 🔍 Exploring next.js middleware\n- 📈 Extending \u0026 Exploring next-auth session\n- 🔄 Exploring next-auth callbacks\n- 👤 useCurrentUser hook\n- 🛂 useRole hook\n- 🧑 currentUser utility\n- 👮 currentRole utility\n- 🖥️ Example with server component\n- 💻 Example with client component\n- 👑 Render content for admins using RoleGate component\n- 🛡️ Protect API Routes for admins only\n- 🔐 Protect Server Actions for admins only\n- 📧 Change email with new verification in Settings page\n- 🔑 Change password with old password confirmation in Settings page\n- 🔔 Enable/disable two-factor auth in Settings page\n- 🔄 Change user role in Settings page (for development purposes only)\n\n### Prerequisites\n\n**Node version 18.7.x**\n\n### Cloning the repository\n\n```shell\ngit clone https://github.com/AntonioErdeljac/next-auth-v5-advanced-guide.git\n```\n\n### Install packages\n\n```shell\nnpm i\n```\n\n### Setup .env file\n\n\n```js\nDATABASE_URL=\nDIRECT_URL=\n\nAUTH_SECRET=\n\nGITHUB_CLIENT_ID=\nGITHUB_CLIENT_SECRET=\n\nGOOGLE_CLIENT_ID=\nGOOGLE_CLIENT_SECRET=\n\nRESEND_API_KEY=\n\nNEXT_PUBLIC_APP_URL=\n```\n\n### Setup Prisma\n```shell\nnpx prisma generate\nnpx prisma db push\n```\n\n### Start the app\n\n```shell\nnpm run dev\n```\n\n## Available commands\n\nRunning commands with npm `npm run [command]`\n\n| command         | description                              |\n| :-------------- | :--------------------------------------- |\n| `dev`           | Starts a development instance of the app |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakibsadman%2Fnext-auth-v5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakibsadman%2Fnext-auth-v5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakibsadman%2Fnext-auth-v5/lists"}