PepeEst
WWasp-lang
•Created by PepeEst on 6/19/2024 in #🙋questions
Updating keycloak roles into database
Well, actually I’m not a keycloak expert neither, I just made a simple integration mixing the basic key cloak knowledge with your login functions.
First, I call the keycloak authentication url in the client (which probably is not very secure), and then give the receive token to my wasp backend through an api endpoint. In that endpoint, first I obtain the user info corresponding to that token with the userinfo keycloak token, and then I sign up the user received into to DB. Finally, with this user I call the framework createAuthToken function to get a wasp token and return it to the client, so I can call the initSession framework function.
As I said, I do not believe it is the most secure way to integrate it, but for the moment it does its functionality.
9 replies
WWasp-lang
•Created by PepeEst on 6/19/2024 in #🙋questions
Updating keycloak roles into database
Actually I’m not in a real hurry.
I was using an older Wasp version in my project (0.11), so I integrate Keycloak myself using the keycloak.js package as an alternative. But since I saw you released the version 0.13 with Keycloak integration I gave it a try.
At this point, I believe the project is not gonna be in production for a while, so I can maintain my own Keycloak installation until you implement the new hook functionality.
Thanks.
9 replies