├── .env.example ├── .gitignore ├── Authentication.excalidraw ├── LICENSE ├── README.md ├── components.json ├── docker-compose.yml ├── drizzle.config.ts ├── eslint.config.mjs ├── next.config.ts ├── package.json ├── postcss.config.mjs ├── public ├── file.svg ├── globe.svg ├── next.svg ├── vercel.svg └── window.svg ├── src ├── actions │ └── toggleRole.ts ├── app │ ├── (auth) │ │ ├── sign-in │ │ │ └── page.tsx │ │ └── sign-up │ │ │ └── page.tsx │ ├── admin │ │ └── page.tsx │ ├── api │ │ └── oauth │ │ │ └── [provider] │ │ │ └── route.ts │ ├── favicon.ico │ ├── globals.css │ ├── layout.tsx │ ├── page.tsx │ └── private │ │ ├── ToggleRoleButton.tsx │ │ └── page.tsx ├── auth │ ├── core │ │ ├── oauth │ │ │ ├── base.ts │ │ │ ├── discord.ts │ │ │ └── github.ts │ │ ├── passwordHasher.ts │ │ └── session.ts │ └── nextjs │ │ ├── actions.ts │ │ ├── components │ │ ├── LogOutButton.tsx │ │ ├── SignInForm.tsx │ │ └── SignUpForm.tsx │ │ ├── currentUser.ts │ │ └── schemas.ts ├── components │ └── ui │ │ ├── button.tsx │ │ ├── card.tsx │ │ ├── form.tsx │ │ ├── input.tsx │ │ └── label.tsx ├── data │ └── env │ │ ├── client.ts │ │ └── server.ts ├── drizzle │ ├── db.ts │ ├── migrations │ │ ├── 0000_faulty_mikhail_rasputin.sql │ │ ├── 0001_curly_quicksilver.sql │ │ └── meta │ │ │ ├── 0000_snapshot.json │ │ │ ├── 0001_snapshot.json │ │ │ └── _journal.json │ └── schema.ts ├── lib │ └── utils.ts ├── middleware.ts └── redis │ └── redis.ts ├── tailwind.config.ts └── tsconfig.json /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/.env.example -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/.gitignore -------------------------------------------------------------------------------- /Authentication.excalidraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/Authentication.excalidraw -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/README.md -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/components.json -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /drizzle.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/drizzle.config.ts -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/eslint.config.mjs -------------------------------------------------------------------------------- /next.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/next.config.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/package.json -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/postcss.config.mjs -------------------------------------------------------------------------------- /public/file.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/public/file.svg -------------------------------------------------------------------------------- /public/globe.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/public/globe.svg -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/public/next.svg -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/public/vercel.svg -------------------------------------------------------------------------------- /public/window.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/public/window.svg -------------------------------------------------------------------------------- /src/actions/toggleRole.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/actions/toggleRole.ts -------------------------------------------------------------------------------- /src/app/(auth)/sign-in/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/(auth)/sign-in/page.tsx -------------------------------------------------------------------------------- /src/app/(auth)/sign-up/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/(auth)/sign-up/page.tsx -------------------------------------------------------------------------------- /src/app/admin/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/admin/page.tsx -------------------------------------------------------------------------------- /src/app/api/oauth/[provider]/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/api/oauth/[provider]/route.ts -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/globals.css -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/layout.tsx -------------------------------------------------------------------------------- /src/app/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/page.tsx -------------------------------------------------------------------------------- /src/app/private/ToggleRoleButton.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/private/ToggleRoleButton.tsx -------------------------------------------------------------------------------- /src/app/private/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/app/private/page.tsx -------------------------------------------------------------------------------- /src/auth/core/oauth/base.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/core/oauth/base.ts -------------------------------------------------------------------------------- /src/auth/core/oauth/discord.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/core/oauth/discord.ts -------------------------------------------------------------------------------- /src/auth/core/oauth/github.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/core/oauth/github.ts -------------------------------------------------------------------------------- /src/auth/core/passwordHasher.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/core/passwordHasher.ts -------------------------------------------------------------------------------- /src/auth/core/session.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/core/session.ts -------------------------------------------------------------------------------- /src/auth/nextjs/actions.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/nextjs/actions.ts -------------------------------------------------------------------------------- /src/auth/nextjs/components/LogOutButton.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/nextjs/components/LogOutButton.tsx -------------------------------------------------------------------------------- /src/auth/nextjs/components/SignInForm.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/nextjs/components/SignInForm.tsx -------------------------------------------------------------------------------- /src/auth/nextjs/components/SignUpForm.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/nextjs/components/SignUpForm.tsx -------------------------------------------------------------------------------- /src/auth/nextjs/currentUser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/nextjs/currentUser.ts -------------------------------------------------------------------------------- /src/auth/nextjs/schemas.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/auth/nextjs/schemas.ts -------------------------------------------------------------------------------- /src/components/ui/button.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/components/ui/button.tsx -------------------------------------------------------------------------------- /src/components/ui/card.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/components/ui/card.tsx -------------------------------------------------------------------------------- /src/components/ui/form.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/components/ui/form.tsx -------------------------------------------------------------------------------- /src/components/ui/input.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/components/ui/input.tsx -------------------------------------------------------------------------------- /src/components/ui/label.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/components/ui/label.tsx -------------------------------------------------------------------------------- /src/data/env/client.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/data/env/client.ts -------------------------------------------------------------------------------- /src/data/env/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/data/env/server.ts -------------------------------------------------------------------------------- /src/drizzle/db.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/drizzle/db.ts -------------------------------------------------------------------------------- /src/drizzle/migrations/0000_faulty_mikhail_rasputin.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/drizzle/migrations/0000_faulty_mikhail_rasputin.sql -------------------------------------------------------------------------------- /src/drizzle/migrations/0001_curly_quicksilver.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/drizzle/migrations/0001_curly_quicksilver.sql -------------------------------------------------------------------------------- /src/drizzle/migrations/meta/0000_snapshot.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/drizzle/migrations/meta/0000_snapshot.json -------------------------------------------------------------------------------- /src/drizzle/migrations/meta/0001_snapshot.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/drizzle/migrations/meta/0001_snapshot.json -------------------------------------------------------------------------------- /src/drizzle/migrations/meta/_journal.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/drizzle/migrations/meta/_journal.json -------------------------------------------------------------------------------- /src/drizzle/schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/drizzle/schema.ts -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/lib/utils.ts -------------------------------------------------------------------------------- /src/middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/middleware.ts -------------------------------------------------------------------------------- /src/redis/redis.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/src/redis/redis.ts -------------------------------------------------------------------------------- /tailwind.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/tailwind.config.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevSimplified/custom-nextjs-authentication/HEAD/tsconfig.json --------------------------------------------------------------------------------