Open Mohido opened 2 years ago
I guess we need a new table in auth_db
@the4t4 It can't be in the auth_db.sql script. The auth_db is very specifiic to Keycloak internal uses. We can create a new DB or a new table in our cap_db. Another reason is that auth_db.sql is imported from keycloak which is the default database that keycloak uses. Therefore, if we need a backup, we will need to create the session store again in the script.
Our current implementation of the backend (api-server) stores the session in the default MemoryStore , which is stated in the npm page that it is not recommended for production use since it leaks memory and has other problems. The best way to go through this is to store the sessions in our database. We need to edit the current implementation to be suitable for productional setup. Read the following npm package webpage to understand how to implement it in the database. Create a table and assign its access to the user that is being used by our api-server.