This is an example how can you use Keycloak JavaScript adapter Svelte/Sapper.
You can find more info in my Dev.to post.