I need to log in to an external idp using keycloak. The initiator of the authorization chain is the frontend. To test this chain I request the endpoint:
https://keycloak_uri/realms/realm/protocol/openid-connect/auth?client_id=my-client&redirect_uri=web_page_uri&response_type=code&scope=openid
where the web_page_uri is the uri on the site from which we came to keycloak -> then to the sso login form of the external idp.
The problem is that as a result of authentication, Keycloak creates a session, but in my project the frontend and backend work with the token.
Question: How do I return my keycloak token? How can I return it to the frontend after SSO authentication? I want to know where to find the token immediately after the redirect to the frontend and how to return the Bearer token in the Authorization header.
-
Your reproduction steps seems to be missing your frontend and backend steps. You don't access Keycloak directly but first with your frontend.Franck– Franck2024年03月18日 23:17:16 +00:00Commented Mar 18, 2024 at 23:17
-
@Franck I have made adjustments to the description.pickstar– pickstar2024年04月02日 23:43:10 +00:00Commented Apr 2, 2024 at 23:43