├── .commitlintrc.json ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .husky ├── commit-msg └── pre-commit ├── .idea ├── .gitignore ├── misc.xml ├── modules.xml ├── next-fortress.iml └── vcs.xml ├── .prettierrc ├── .releaserc.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── example ├── .env.local.sample ├── .eslintrc ├── .gitignore ├── README.md ├── next-env.d.ts ├── next.config.js ├── package.json ├── public │ ├── favicon.ico │ └── vercel.svg ├── src │ ├── lib │ │ ├── AuthContext.ts │ │ ├── admin.ts │ │ ├── authReducer.ts │ │ └── firebase.ts │ ├── middleware.ts │ ├── pages │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ ├── api │ │ │ ├── auth │ │ │ │ ├── [...auth0].ts │ │ │ │ └── logout.ts │ │ │ └── firebase │ │ │ │ ├── create-token.ts │ │ │ │ └── destroy-token.ts │ │ ├── auth0 │ │ │ ├── authed.tsx │ │ │ └── index.tsx │ │ ├── cognito │ │ │ ├── authed.tsx │ │ │ └── index.tsx │ │ ├── firebase │ │ │ ├── authed.tsx │ │ │ └── index.tsx │ │ ├── index.tsx │ │ └── ip │ │ │ ├── admin.tsx │ │ │ └── index.tsx │ └── styles │ │ ├── Home.module.css │ │ └── globals.css ├── tsconfig.json └── yarn.lock ├── package.json ├── src ├── __tests__ │ ├── auth0.spec.ts │ ├── cognito.spec.ts │ ├── firebase.spec.ts │ ├── handle-fallback.spec.ts │ └── ip.spec.ts ├── auth0.ts ├── cognito.ts ├── constants.ts ├── firebase.ts ├── handle-fallback.ts ├── index.ts ├── ip.ts └── types.ts ├── tsconfig.json ├── vitest.config.ts └── yarn.lock /.commitlintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.commitlintrc.json -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn commitlint --edit 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.idea/.gitignore -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.idea/misc.xml -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.idea/modules.xml -------------------------------------------------------------------------------- /.idea/next-fortress.iml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.idea/next-fortress.iml -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.idea/vcs.xml -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.prettierrc -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/.releaserc.json -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/README.md -------------------------------------------------------------------------------- /example/.env.local.sample: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/.env.local.sample -------------------------------------------------------------------------------- /example/.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/.eslintrc -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/.gitignore -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/README.md -------------------------------------------------------------------------------- /example/next-env.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/next-env.d.ts -------------------------------------------------------------------------------- /example/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/next.config.js -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/package.json -------------------------------------------------------------------------------- /example/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/public/favicon.ico -------------------------------------------------------------------------------- /example/public/vercel.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/public/vercel.svg -------------------------------------------------------------------------------- /example/src/lib/AuthContext.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/lib/AuthContext.ts -------------------------------------------------------------------------------- /example/src/lib/admin.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/lib/admin.ts -------------------------------------------------------------------------------- /example/src/lib/authReducer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/lib/authReducer.ts -------------------------------------------------------------------------------- /example/src/lib/firebase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/lib/firebase.ts -------------------------------------------------------------------------------- /example/src/middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/middleware.ts -------------------------------------------------------------------------------- /example/src/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/_app.tsx -------------------------------------------------------------------------------- /example/src/pages/_document.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/_document.tsx -------------------------------------------------------------------------------- /example/src/pages/api/auth/[...auth0].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/api/auth/[...auth0].ts -------------------------------------------------------------------------------- /example/src/pages/api/auth/logout.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/api/auth/logout.ts -------------------------------------------------------------------------------- /example/src/pages/api/firebase/create-token.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/api/firebase/create-token.ts -------------------------------------------------------------------------------- /example/src/pages/api/firebase/destroy-token.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/api/firebase/destroy-token.ts -------------------------------------------------------------------------------- /example/src/pages/auth0/authed.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/auth0/authed.tsx -------------------------------------------------------------------------------- /example/src/pages/auth0/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/auth0/index.tsx -------------------------------------------------------------------------------- /example/src/pages/cognito/authed.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/cognito/authed.tsx -------------------------------------------------------------------------------- /example/src/pages/cognito/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/cognito/index.tsx -------------------------------------------------------------------------------- /example/src/pages/firebase/authed.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/firebase/authed.tsx -------------------------------------------------------------------------------- /example/src/pages/firebase/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/firebase/index.tsx -------------------------------------------------------------------------------- /example/src/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/index.tsx -------------------------------------------------------------------------------- /example/src/pages/ip/admin.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/ip/admin.tsx -------------------------------------------------------------------------------- /example/src/pages/ip/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/pages/ip/index.tsx -------------------------------------------------------------------------------- /example/src/styles/Home.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/styles/Home.module.css -------------------------------------------------------------------------------- /example/src/styles/globals.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/src/styles/globals.css -------------------------------------------------------------------------------- /example/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/tsconfig.json -------------------------------------------------------------------------------- /example/yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/example/yarn.lock -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/package.json -------------------------------------------------------------------------------- /src/__tests__/auth0.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/__tests__/auth0.spec.ts -------------------------------------------------------------------------------- /src/__tests__/cognito.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/__tests__/cognito.spec.ts -------------------------------------------------------------------------------- /src/__tests__/firebase.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/__tests__/firebase.spec.ts -------------------------------------------------------------------------------- /src/__tests__/handle-fallback.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/__tests__/handle-fallback.spec.ts -------------------------------------------------------------------------------- /src/__tests__/ip.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/__tests__/ip.spec.ts -------------------------------------------------------------------------------- /src/auth0.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/auth0.ts -------------------------------------------------------------------------------- /src/cognito.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/cognito.ts -------------------------------------------------------------------------------- /src/constants.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/constants.ts -------------------------------------------------------------------------------- /src/firebase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/firebase.ts -------------------------------------------------------------------------------- /src/handle-fallback.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/handle-fallback.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/ip.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/ip.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/src/types.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/tsconfig.json -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/vitest.config.ts -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aiji42/next-fortress/HEAD/yarn.lock --------------------------------------------------------------------------------