{"id":27309193,"url":"https://github.com/korabi123/advanced-auth-guide-2024","last_synced_at":"2026-04-06T04:03:42.648Z","repository":{"id":215090334,"uuid":"737877834","full_name":"Korabi123/advanced-auth-guide-2024","owner":"Korabi123","description":"An advanced repo dedicated for authentication built with the most modern web techonologies.","archived":false,"fork":false,"pushed_at":"2024-01-16T12:27:54.000Z","size":566,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-17T20:52:42.011Z","etag":null,"topics":["2024","authentication-middleware","fullstack","github","neondb","next-auth-v5","nextjs14","prisma","server-actions","shadcn-ui","tailwindcss","typescript","zod"],"latest_commit_sha":null,"homepage":"https://advanced-auth-five.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Korabi123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-01T20:23:22.000Z","updated_at":"2024-05-07T17:32:20.000Z","dependencies_parsed_at":"2024-01-14T14:36:12.434Z","dependency_job_id":null,"html_url":"https://github.com/Korabi123/advanced-auth-guide-2024","commit_stats":null,"previous_names":["korabi123/advanced-auth-guide-2024"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korabi123%2Fadvanced-auth-guide-2024","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korabi123%2Fadvanced-auth-guide-2024/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korabi123%2Fadvanced-auth-guide-2024/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Korabi123%2Fadvanced-auth-guide-2024/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Korabi123","download_url":"https://codeload.github.com/Korabi123/advanced-auth-guide-2024/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248520843,"owners_count":21117939,"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":["2024","authentication-middleware","fullstack","github","neondb","next-auth-v5","nextjs14","prisma","server-actions","shadcn-ui","tailwindcss","typescript","zod"],"created_at":"2025-04-12T05:23:51.229Z","updated_at":"2026-04-06T04:03:42.568Z","avatar_url":"https://github.com/Korabi123.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next Auth v5 - Advanced Repository (2024)\n\n![image](https://camo.githubusercontent.com/b75e91243ebf112aa9ea6045d97ee08c782376d48d7a384b2fb5f660cebd328c/68747470733a2f2f6b6f726162692d65636f6d6d657263652d61646d696e2e76657263656c2e6170702f5f6e6578742f696d6167653f75726c3d68747470732533412532462532467265732e636c6f7564696e6172792e636f6d253246646e636d6a7034317a253246696d61676525324675706c6f616425324676313730343134363539372532466a73716363616e33676a74636f6f7372627974612e706e6726773d3139323026713d3735)\n\nThis is a repository for Next Auth v5 (2024)\n\nOnce finished this Project will have the following Key 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## For the env file use this template:\n```env\n# Environment variables declared in this file are automatically made available to Prisma.\n# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema\n\n# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.\n# See the documentation for all the connection string options: https://pris.ly/d/connection-strings\n\nDATABASE_URL=\"\"\nDIRECT_URL=\"\"\n\n# NextAuth\nAUTH_SECRET=\"\"\nGITHUB_CLIENT_ID=\nGITHUB_CLIENT_SECRET=\nGOOGLE_CLIENT_ID=\nGOOGLE_CLIENT_SECRET=\n\n# Resend Mail\nRESEND_API_KEY=\n\nNEXT_PUBLIC_APP_URL=\"\"\n```\n\nProject Progress:\n- [x] Project structure\n- [x] Landing page\n- [x] Login Component (Redirect)\n- [x] Register Component\n- [x] Login Button\n- [x] Social Login Component\n- [x] Credentials Provider\n- [x] OAuth Provider\n- [x] User Roles\n- [x] Email Verification\n- [x] Forgot Password Component\n- [x] 2FA\n- [x] Hooks\n- [x] Role Gate\n- [x] Protect API Routes for Admins only\n- [x] Protect Server Actions for Admins only\n- [x] Change Email\n- [x] Enable / disable 2FA in settings","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorabi123%2Fadvanced-auth-guide-2024","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkorabi123%2Fadvanced-auth-guide-2024","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorabi123%2Fadvanced-auth-guide-2024/lists"}