PepeEst
PepeEst
WWasp-lang
Created by PepeEst on 6/19/2024 in #🙋questions
Updating keycloak roles into database
Hey there, I was trying to integrate Keycloak into my Wasp project but I got into a problem. I wanted to add my client roles into my database whenever a user tries to log in so I can query those roles for specific operations later. For that I used the getConfig and userSignupFields functions from the Keycloak implementation. Until then, everything was ok and it worker, the problem is that after that user is saved into my databases, if I decided to change this user´s roles into Keycloak, next time the user log in, it is not updating those new roles into the database. After a long time thinking, I decided to call the Keycloak /userinfo endpoint myself in every operation. But for that I need the keycloak access token which I do not have. Am I missing something? Any other suggestions about how to solve my problem? Thanks 😉
9 replies