I am working on a project where my backend is secured by Keycloak, but I want to connect my frontend without having the frontend perform direct authentication with Keycloak.
The idea is that the frontend should still be able to make API requests to the backend, which is secured by Keycloak, without the frontend explicitly logging in or handling the user’s credentials directly with Keycloak.
My Questions:
- Is it possible to bypass direct authentication on the frontend while
still interacting with a backend that is secured by Keycloak? If so,
what are the best practices for securely allowing the frontend to
communicate with the backend without having to handle user
authentication directly? - Could the backend authenticate with Keycloak
on behalf of the frontend, and if so, how would that work? I am aware
that typically the frontend interacts directly with Keycloak to
obtain an access token, but I’m exploring whether it’s possible to
avoid this while still having secure communication between the
frontend and backend. - Can I somehow connect to keycloak as a frontend application?
Any guidance or suggestions would be greatly appreciated!