Test & learning application to utilize a VueJs frontend with a Go backend speaking with Keycloak as identity provider.
- the Go backend is exposing a REST endpoint /auth (POST) on
localhost:5000, taking a JSON{"username":"[email protected]","password":"test"}and is delivering a JWT back if the username was[email protected], elseHTTP/403 Forbidden - the VueJs frontend is providing a login screen on
http://localhost:8080and is logging the user into the/mainroute on success
-
pull the
jboss/keycloakimagedocker pull jboss/keycloak -
start the image
docker run -p 38080:8080 --name keycloak -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin jboss/keycloak -
login to the keycloak admin console on
http://localhost:38080/auth/> Users > Add User > create the[email protected]user
-
when the user is successfully created, on the Credentials tab, set
testas new password for this user (make sure you switch Temporary off)
-
start the backend
cd backend; go run cmd/server/server.go -
prep frontend node modules
cd frontend; yarn -
start the frontend
yarn serve(in frontend) -> go tohttp://localhost:8080/to use the frontend, login with[email protected]

