Open michielbdejong opened 3 days ago
I can reuse code from https://github.com/tosdr/ota-engine/commit/8d8f48bd8c2ac6242d9980bca808de5843940c06
JSON-stringifying Session objects is not the way. Instead, it seems we need to pass a k-v store to the Session constructor:
export default interface IStorage {
get: (key: string) => Promise<string | undefined>;
set: (key: string, value: string) => Promise<void>;
delete: (key: string) => Promise<void>;
}
Should also read the docs about how to persist @inrupt/solid-client-authn-node
sessions to db.
I found the relevant docs for storing the Solid sessions. Moving this to solid-client, and adding that as a dependency of solid-slack-bridge. Solid-slack-bridge can then still keep its own db table to link Slack UUIDs to Solid WebIDs.
In the current code, a 'session' is a link between a specific Slack user (UUID) and a specific Solid pod (web ID).
It is stored in memory, so it's lost whenever the server restarts.