Using Keycloak 26x

25 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

Kenneth Lindhardt

unread,
Apr 23, 2025, 5:51:56 AMApr 23
to mapstore-developers
Hi I'm trying to setup Keycloak, and use it for Mapstore login. I'm using a keycloak version, that I can't recognize from the documentation, so it has taken me some time to get to the point where I am now, and I feel stuck.

I can see that there's a connection, I can see though the terminal that the tokens are passed etc. But in the browser, I can't seem to load the loginscreen and the keycloak is failing:
mapstore2.js?164634420a351601:2  Cannot load keycloak JS API for Single sign on support Error: Error loading script at URL https://homepage/js/keycloak.js
    at Xe.Observable.of.merge.merge.merge.map.combineLatest.Xe.Observable.defer.Mh.<computed>.n.onerror (mapstore2.js?164634420a351601:2:1288388)

Does someone know where I've gone wrong here?
https://homepage/js/keycloak.js does not exist. To me it seems like mapstore wants to connect to something that is used in older versions, and i have a bit of tunnel vision on it now.

Thanks

Kenneth Lindhardt

unread,
Apr 23, 2025, 12:30:41 PMApr 23
to mapstore-developers
Also, when Iøm clickong the login button it redirects me to:  myhomepage.com/rest/geostore/openid/keycloak/login , which only contains an empty screen

Lorenzo Natali

unread,
Apr 28, 2025, 4:19:20 AMApr 28
to mapstore-developers
Hi,
I don't know the version of keycloak you are using, so it's hard to figure out your problems. Anyway you are following the "more complex integration" specific of keycloak, to support a full SSO integration, that recognizes your login even if done in another context. If you don't need this advanced feature, I'd suggest to follow the generic guide for openID, that includes also keycloak use case.

Kenneth Lindhardt

unread,
Apr 28, 2025, 4:43:06 AMApr 28
to mapstore-...@googlegroups.com
Thank you Lorenzo.
I think it was an issue with the newer versions of keycloak and the documentations not matching exactly.

Under my mapstore-server client I needed to go to client scopes then the mapstore-server-dedicated and add a sub mapper.

Just got it working last night, so so far I'm happy, it was just taking way too long time, since overseeing that made me test all kinds of things and created af mess 😊

Cheers.

--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/mapstore-developers/c7760740-4ee9-497a-bbf8-8989ab58070bn%40googlegroups.com.

Kenneth Lindhardt

unread,
May 5, 2025, 4:15:49 AMMay 5
to mapstore-developers
Sorry, I need to take this up again, I'm still confused about the keyclaok.js that mapstore is trying to reach. It's not there.
At the moment I'm so close:

Create user, uses keycloak and takes the domain from the created user to a role, that then gets to a group in maptsore - Awesome.
I open up my partal, login though keycloak click on mapstore. Now I want to be logged in, but I need to go to profile icon --> login --> click the keycloak icon and then I'm logged in. 

I can't figure out if it's due to the keycloak.js file that is not existing or if it's my settings or what, or if this is as it should be?
Thanks

Lorenzo Natali

unread,
May 9, 2025, 9:17:09 AMMay 9
to mapstore-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages