$ sudo docker run -d -p 8080:8080 \
-e KEYCLOAK_USER=admin \
-e KEYCLOAK_PASSWORD=admin \
quay.io/keycloak/keycloak:10.0.2
- Login to Keycloak admin panel and create a client with using the provided example_client.json file.
- Create a normal user.
- Admin user has realm admin role already.
- Setup public key in utils.js for the client.
Need nodejs>=10
Install packages:
$ npm i
Run the node server:
$ npm start
Server runs on port 3000.
- DONOT set
all requests
under Realm Settings > Login > Require SSL. Use proxy SSL termination. - Currently using
openid-connect
for client. implicit
flow uses reponseType astoken id_token
,explicit
usescode
.- In "Mappers" of a client, "Attributes" of a user can be set as token values.