https://github.com/herol3oy/angular-keycloak
Angular app secured route with Keyloak (keycloak.org)
https://github.com/herol3oy/angular-keycloak
angular keycloak
Last synced: about 1 month ago
JSON representation
Angular app secured route with Keyloak (keycloak.org)
- Host: GitHub
- URL: https://github.com/herol3oy/angular-keycloak
- Owner: herol3oy
- Created: 2021-04-18T21:46:46.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-20T07:46:34.000Z (about 5 years ago)
- Last Synced: 2025-02-22T07:41:48.654Z (over 1 year ago)
- Topics: angular, keycloak
- Language: TypeScript
- Homepage:
- Size: 299 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular with Keycloak
## Running the keycloak server
- Clone the repo
- `git clone https://github.com/herol3oy/angular-keycloak.git`
- Run the Keycloak serve
- Navigate to app dir `cd angular-keycloak`
- Build and run the container `docker-compose up`
- Create a new user to be associated with thefront end app
- Navigate to `http://localhost:8080/` and enter `Administration Console` by using `username:admin` and `password:admin`
- Create a new realm by clicking on `Add realm`
- Type a name and press `create`
- In the left sidebar under `Manage` click on `Users`
- Create a new user by clicking on `Add user`. Type your `Username` and press `save`.
- To add your password to created user click on `Credentials` tab and type your `Password` and `Password Confirmation`. Set the `Temporary` to `OFF` and press `Set Password`.
## Running the front end app
- Install dependencies and start the app `npm i && ng serve`
- In the app directory, open `src/app/utility/app.init.ts`
- Type your created `realm` and `clientId`
- Navigate to `http://localhost:4200/` and try to login. The `http://localhost:4200/login` should be secured by Keyloak service and you need to login with your created `username` and `password`