@react-keycloak-refork/core
v8.0.2
Published
Fork of https://github.com/react-keycloak/react-keycloak.git with updated packages for Keycloak >=19. React bindings for Keycloak javascript adapter (core)
Downloads
278
Readme

React Keycloak (Keycloak >=v26 Fork)
React bindings for Keycloak. Fork of https://github.com/react-keycloak/react-keycloak.git with updated packages for keycloak >=26 support.
⚠️ IMPORTANT NOTICE: This fork has been updated to support Keycloak 26, but it is NOT MAINTAINED. We strongly recommend migrating to NextAuth.js for new projects, as it provides better maintenance, security updates, and broader OAuth provider support.
Table of Contents
Integrations
React
React Keycloak for Web requires:
- React 19.0 or later
keycloak-js26.0.0 or later
yarn add @react-keycloak-fork/webor
npm install --save @react-keycloak-fork/webor as a UMD package through unpkg
See @react-keycloak-fork/web package README for complete documentation.
SSR
React Keycloak for SSR frameworks requires:
- React 19.0 or later
- SSR Framework:
- NextJS 9 or later
- Razzle 3 or later
keycloak-js26.0.0 or later
yarn add @react-keycloak-fork/ssror
npm install --save @react-keycloak-fork/ssrSee @react-keycloak-fork/ssr package README for complete documentation.
React Native
React Keycloak for React Native requires React Native 61.0 or later
To install run
yarn add @react-keycloak-fork/nativeor
npm install --save @react-keycloak-fork/nativeSee @react-keycloak-fork/native package README for complete documentation.
Support
| version | keycloak-js version | notes | | ------- | ------------------- | ------ | | v4.0.3+ | 26.0.0+ | (fork) | | v4.0.1+ | 17.0.0+ | (fork) | | v2.0.0+ | 9.0.2+ | | v1.x | >=8.0.2 <9.0.2 |
Examples
See @react-keycloak-fork/react-keycloak-examples repository for various demo implementing this library main features.
Alternatives
If you need to connect using a more generic OIDC client instead of keycloak.js, consider using one of the following libraries:
Migration Notice
⚠️ This project is no longer maintained. For new projects, we strongly recommend using NextAuth.js instead, which provides:
- ✅ Active maintenance and security updates
- ✅ Support for 50+ OAuth providers including Keycloak
- ✅ Better TypeScript support
- ✅ Modern React patterns and hooks
- ✅ Comprehensive documentation and examples
- ✅ Active community and support
Migrating to NextAuth.js
To migrate from this library to NextAuth.js with Keycloak:
- Install NextAuth.js:
npm install next-auth - Configure Keycloak as a provider in your NextAuth configuration
- Replace
useKeycloak()hooks with NextAuth'suseSession()andsignIn()/signOut()functions - Update your authentication logic to use NextAuth's session management
See the NextAuth.js documentation for detailed migration instructions.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
