DEV Community

Discussion on: Secure Svelte with Keycloak

Collapse
 
matejbucek profile image
Matěj Bucek

I made a new branch in the repository called “updated”. There you can find a working example using Svelte-kit.

Collapse
 
johnone profile image
johnone

Thanks a lot! I tried it, however I encounter a "window is not defined" error which I saw a lot lately when trying things out with SvelteKit and Keycloak. I figure this has to do with SSR. If you can give a hint I am very thankful.

Thread Thread
 
johnone profile image
johnone

Sorry! My Bad, had a typo in my registry... Example is working! Thank you for this.

Collapse
 
ogaims profile image
ogaims • Edited

The code seems to be broken. TypeError: Cannot read properties of undefined (reading 'init'), because keycloak can't be initilized most of time. It works randomly, sometimes, but quite rare.