This repository contains source code to demonstrate how to implement Authorization Code Flow (PKCE) using Spring Boot, Angular and Keycloak.
-
- Download Keycloak from https://www.keycloak.org/downloads
- If you are using standalone version, run the following command, by making sure you are inside the bin directory
standalone.bat -Djboss.http.port=<port>, you can provide whatever port number you like.
-
- Instead of creating the realm, you can make use of the
realm-export.jsonfile to import all the realm details into your Keycloak instance.
- Instead of creating the realm, you can make use of the
-
- Pre-Requisite: Make sure the Keycloak server is running.
- Run
mvn clean verify - Run
Oauth2SpaDemoApplicationclass.
-
- Go to the
src/main/resources/frontendand runnpm install - Start the server using
npm startcommand. - Open
http://localhost:4200
- Go to the