Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial access causes white screen since v5.3.0 #39

Open
tobias-kellner opened this issue Oct 30, 2024 · 5 comments
Open

Initial access causes white screen since v5.3.0 #39

tobias-kellner opened this issue Oct 30, 2024 · 5 comments

Comments

@tobias-kellner
Copy link

I have a simple React + Vite web application and I am using oidc-spa with KC26. With the latest oidc-spa version I have the problem that I cannot access my application. I am getting a white screen. I have set the isAuthGloballyRequired flag to true.
But I am getting the problem only when I access my application with the PC's IP address (http://192.168.178.129:5173/) with http://localhost:5173 or http://127.0.0.1:5173 it is working fine. The browsers console or network tab are showing no problems at all. At first I had a CORS problem in mind but configuring Keycloak with * does not help.

I did go back the versions until it worked again and it seems like the problem exists since the v5.3.0 release. With v5.2.8 it works as expected.

If you need any further information to fix this just let me know.

Thanks!

@garronej
Copy link
Collaborator

Hello @tobias-kellner,

Thank for reporting.
Could you please enable debug logs and share it with us (in the latest version).

@tobias-kellner
Copy link
Author

Hey @garronej, sure. This is what I am getting if I try to access 192.168.178.129:5173:

image

@garronej
Copy link
Collaborator

Thanks, and what's the initialization error?

you can console log it in the ErrorFallback component provided as props to the in enforced auth mode:

https://docs.oidc-spa.dev/documentation/globally-enforce-authentication

@tobias-kellner
Copy link
Author

The ErrorFallback does not getting fired.
But during debugging I enabled the VS Code feature to catch uncaught exceptions. There I can see two things:

  • Crypto.subtle is available only in secure contexts (HTTPS).
  • The OIDC client jupiter seems to be misconfigured on your OIDC server. If you are using Keycloak you likely need to add "http://192.168.178.129:5173/*" to the list of Valid Redirect URIs in the jupiter client configuration.

I already tested around with the valid redirect URIs. That seems not to be the problem. I guess it is either the HTTPS thing.

@garronej
Copy link
Collaborator

Ok I understand
Thanks for the report. I'll see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants