dasniko/keycloak-reactjs-demo
关于
React.JS 与 Keycloak SSO 集成的参考示例。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Keycloak React.JS Demo
Demo and reference implementation for React.JS and Keycloak IAM & SSO integration.
With this approach, there's no need for 3rd party dependencies (besides the official default keycloak-js lib) and custom components base on auth state are implemented with ease and best developer experience.
YouTube videos
There are three videos on YouTube about this demo repository and how to integrate your React.js based application with Keycloak:
Part 1: Configuration & Usage, w/o 3rd party libs
Part 2: Conditional rendering of components
Part 3: React Router Integration, depending on Keycloak Roles
Please check out also my entire Youtube Channel with various videos on Keycloak and stuff around:
Prerequisites
- based on React version >= 18 and Vite
- uses React Router v6
- Keycloak server should be a most recent one
!!! Important Notice !!!
This demo is just for showing one possibility on how to configure the app when using Keycloak and it requires a certain knowledge about Keycloak SSO (installation, operation, configuration), see http://www.keycloak.org.
Backend service
For convenience, I provide a working backend service, providing the data, running on AWS Lambda. It should work and be available out of the box.
However, there's also a swagger spec (backend-swagger-spec.yml) providing the API of the needed backend, so you can spin up a service on your own.
The URLs in the securityDefinitions section shows my local Keycloak setup, you have to adjust this possibly!
(Also don't forget to adjust the host/port in the setupProxy.js file, if you run your service on ohters than default.)
探索相关项目
加载中…


