I am implementing a small tool with integration with GitLab as Identity Provider. React on the frontend, Quarkus on the backend.
I have configured my backend as web_app and this part is working. After entering localhost:8080/auth (backend) Quarkus redirects me to the GitLab, after login I am redirected back to the backend which returns UserInfo as JSON.
Now I want to add frontend part based on sessions (cookies). According to the docs I set quarkus.oidc.authentication.java-script-auto-redirect=false and my frontend receives 499 code and then using window.location.assign browser opens backend -> GitLab -> login -> UserInfo as JSON. And at the end, flow stops on the backend, and I am not able to get back to the frontend.
- Is my flow correct? Is it even possible to achieve this (OIDC on the backend and session for frontend)?
- How I can wrap
window.location.assign("http://localhost:8080/auth")to hold frontend context (I need to use this, otherwise redirect to GitLab will fail with CORS)?