This is an example for using keycloakJS library together with TanstackStart.
It was the main goal to allow all Tanstack-Router features like loading, pre-loading to work seamless.
So this solution uses router-context.
This is a devcontainer repo and works on VSCode devcontainers. Nothing else to install.
You need a running docker desktop for your Devcontainer-Based VSCode
It uses the following ports:
- keycloak: localhost:8280
- keycloak db: localhost: 5432 (internally 5435)
You can change these ports by working on .devcontainer/docker-compose.yml
Starting the application occupies port 3010 (dev and start). To change that you have to modify package.json
-
Open the repo in VS Code and build/load it in DevContainer.
-
Open the local keycloak admin console in the browser by [http://localhost:8280]
-
Login to your local keycloak as admin/admin
-
Select the master realm and create a new client with
clients => create client
-
Name the secret
tanstack-start-keycloak
-
Add validate redirect URIs
- Same post-logout URI's
- Web-origins should be also the same
No additional settings are needed.
npm run dev
or
npm build
npm run start
npm install is executed on devcontainer start
- TanStack Start - The web framework used
- keycloakJS - Keycloak client library
- Michael H. Vogt - Typescript Developer - progwise.net
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used
- Inspiration
- etc
