├── .github ├── add-client-nextjs-1.png ├── add-client-nextjs-2.png ├── add-client-nextjs-credentials.png ├── add-client-nodejs-1.png ├── add-client-nodejs-2.png ├── add-client-nodejs-add-admin-role.png ├── add-client-nodejs-add-user-role.png ├── add-client-nodejs-credentials.png ├── add-client-nodejs-list-roles-1.png ├── add-client-nodejs-list-roles-2.png ├── add-realm.png ├── add-user-credentials.png ├── add-user-role-mappings-app-admin.png ├── add-user-role-mappings-app-user-&-app-admin.png ├── add-user-role-mappings-app-user.png ├── add-user.png ├── api-refresh-token-with-interceptors.jpg ├── generate-token-with-keycloak-api.png ├── keycloak-all-endpoints.png ├── keycloak-banner.png ├── keycloak-login-page.png ├── list-clients.png ├── list-realm-roles.png ├── nextjs-app-home.png ├── nextjs-app-profile-without-data.png ├── nextjs-app-profile.png ├── realm-add-app-admin-role-bind-nodejs-client-admin-role.png ├── realm-add-app-user-role-bind-nodejs-client-user-role.png ├── realm-add-app-user-role.png ├── realm-settings.png └── realm-tokens-settings.jpg ├── LICENSE ├── README.md ├── docker └── keycloak │ └── docker-compose.yaml ├── nextjs ├── .env.local.example ├── .eslintrc.json ├── .gitignore ├── next-env.d.ts ├── next.config.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ └── vercel.svg ├── src │ ├── @types │ │ └── next-auth.d.ts │ ├── components │ │ ├── Header │ │ │ └── index.tsx │ │ └── Layout │ │ │ └── index.tsx │ ├── hooks │ │ └── useAPIClient.ts │ ├── pages │ │ ├── _app.tsx │ │ ├── api │ │ │ └── auth │ │ │ │ ├── [...nextauth].ts │ │ │ │ └── keycloakRefreshToken.ts │ │ ├── index.tsx │ │ └── profile.tsx │ └── services │ │ └── api.ts └── tsconfig.json └── nodejs ├── .gitignore ├── package-lock.json ├── package.json ├── src ├── @types │ └── express.d.ts ├── app.ts ├── config │ └── keycloak.ts ├── errors │ └── AppError.ts ├── routes │ └── index.ts ├── server.ts └── utils │ └── keycloakProtect.ts └── tsconfig.json /.github/add-client-nextjs-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nextjs-1.png -------------------------------------------------------------------------------- /.github/add-client-nextjs-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nextjs-2.png -------------------------------------------------------------------------------- /.github/add-client-nextjs-credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nextjs-credentials.png -------------------------------------------------------------------------------- /.github/add-client-nodejs-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nodejs-1.png -------------------------------------------------------------------------------- /.github/add-client-nodejs-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nodejs-2.png -------------------------------------------------------------------------------- /.github/add-client-nodejs-add-admin-role.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nodejs-add-admin-role.png -------------------------------------------------------------------------------- /.github/add-client-nodejs-add-user-role.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nodejs-add-user-role.png -------------------------------------------------------------------------------- /.github/add-client-nodejs-credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nodejs-credentials.png -------------------------------------------------------------------------------- /.github/add-client-nodejs-list-roles-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nodejs-list-roles-1.png -------------------------------------------------------------------------------- /.github/add-client-nodejs-list-roles-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-client-nodejs-list-roles-2.png -------------------------------------------------------------------------------- /.github/add-realm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-realm.png -------------------------------------------------------------------------------- /.github/add-user-credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-user-credentials.png -------------------------------------------------------------------------------- /.github/add-user-role-mappings-app-admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-user-role-mappings-app-admin.png -------------------------------------------------------------------------------- /.github/add-user-role-mappings-app-user-&-app-admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-user-role-mappings-app-user-&-app-admin.png -------------------------------------------------------------------------------- /.github/add-user-role-mappings-app-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-user-role-mappings-app-user.png -------------------------------------------------------------------------------- /.github/add-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/add-user.png -------------------------------------------------------------------------------- /.github/api-refresh-token-with-interceptors.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/api-refresh-token-with-interceptors.jpg -------------------------------------------------------------------------------- /.github/generate-token-with-keycloak-api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/generate-token-with-keycloak-api.png -------------------------------------------------------------------------------- /.github/keycloak-all-endpoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/keycloak-all-endpoints.png -------------------------------------------------------------------------------- /.github/keycloak-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/keycloak-banner.png -------------------------------------------------------------------------------- /.github/keycloak-login-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/keycloak-login-page.png -------------------------------------------------------------------------------- /.github/list-clients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/list-clients.png -------------------------------------------------------------------------------- /.github/list-realm-roles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/list-realm-roles.png -------------------------------------------------------------------------------- /.github/nextjs-app-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/nextjs-app-home.png -------------------------------------------------------------------------------- /.github/nextjs-app-profile-without-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/nextjs-app-profile-without-data.png -------------------------------------------------------------------------------- /.github/nextjs-app-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/nextjs-app-profile.png -------------------------------------------------------------------------------- /.github/realm-add-app-admin-role-bind-nodejs-client-admin-role.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/realm-add-app-admin-role-bind-nodejs-client-admin-role.png -------------------------------------------------------------------------------- /.github/realm-add-app-user-role-bind-nodejs-client-user-role.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/realm-add-app-user-role-bind-nodejs-client-user-role.png -------------------------------------------------------------------------------- /.github/realm-add-app-user-role.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/realm-add-app-user-role.png -------------------------------------------------------------------------------- /.github/realm-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/realm-settings.png -------------------------------------------------------------------------------- /.github/realm-tokens-settings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/.github/realm-tokens-settings.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/README.md -------------------------------------------------------------------------------- /docker/keycloak/docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/docker/keycloak/docker-compose.yaml -------------------------------------------------------------------------------- /nextjs/.env.local.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/.env.local.example -------------------------------------------------------------------------------- /nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /nextjs/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/.gitignore -------------------------------------------------------------------------------- /nextjs/next-env.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/next-env.d.ts -------------------------------------------------------------------------------- /nextjs/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/next.config.js -------------------------------------------------------------------------------- /nextjs/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/package-lock.json -------------------------------------------------------------------------------- /nextjs/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/package.json -------------------------------------------------------------------------------- /nextjs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/public/favicon.ico -------------------------------------------------------------------------------- /nextjs/public/vercel.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/public/vercel.svg -------------------------------------------------------------------------------- /nextjs/src/@types/next-auth.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/@types/next-auth.d.ts -------------------------------------------------------------------------------- /nextjs/src/components/Header/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/components/Header/index.tsx -------------------------------------------------------------------------------- /nextjs/src/components/Layout/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/components/Layout/index.tsx -------------------------------------------------------------------------------- /nextjs/src/hooks/useAPIClient.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/hooks/useAPIClient.ts -------------------------------------------------------------------------------- /nextjs/src/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/pages/_app.tsx -------------------------------------------------------------------------------- /nextjs/src/pages/api/auth/[...nextauth].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/pages/api/auth/[...nextauth].ts -------------------------------------------------------------------------------- /nextjs/src/pages/api/auth/keycloakRefreshToken.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/pages/api/auth/keycloakRefreshToken.ts -------------------------------------------------------------------------------- /nextjs/src/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/pages/index.tsx -------------------------------------------------------------------------------- /nextjs/src/pages/profile.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/pages/profile.tsx -------------------------------------------------------------------------------- /nextjs/src/services/api.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/src/services/api.ts -------------------------------------------------------------------------------- /nextjs/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nextjs/tsconfig.json -------------------------------------------------------------------------------- /nodejs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /nodejs/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/package-lock.json -------------------------------------------------------------------------------- /nodejs/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/package.json -------------------------------------------------------------------------------- /nodejs/src/@types/express.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/src/@types/express.d.ts -------------------------------------------------------------------------------- /nodejs/src/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/src/app.ts -------------------------------------------------------------------------------- /nodejs/src/config/keycloak.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/src/config/keycloak.ts -------------------------------------------------------------------------------- /nodejs/src/errors/AppError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/src/errors/AppError.ts -------------------------------------------------------------------------------- /nodejs/src/routes/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/src/routes/index.ts -------------------------------------------------------------------------------- /nodejs/src/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/src/server.ts -------------------------------------------------------------------------------- /nodejs/src/utils/keycloakProtect.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/src/utils/keycloakProtect.ts -------------------------------------------------------------------------------- /nodejs/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sup3r-Us3r/keycloak-nextjs-nodejs/HEAD/nodejs/tsconfig.json --------------------------------------------------------------------------------