Skip to main content

Module store

Module store 

Source
Expand description

Redis-backed auth token store.

Maps Discord user ids → FicHub JWT tokens. Tokens live in the same Redis instance FicHub uses (archivist:token:<discord_id>), so the bot can be restarted without losing linked accounts. TTL is 30 days by default.

Structs§

PendingLink
Pending /link code: Discord id + creation time.
PendingLinkStore
Store for pending one-time link codes (web-side confirmation flow).
StoredToken
A stored token + the user info it maps to.
TokenStore
Redis-backed token store.

Constants§

TOKEN_TTL_SECS
Default TTL for stored tokens (30 days).