diff options
author | Moritz Friedrich <moritz@matchory.com> | 2023-01-05 18:33:42 +0100 |
---|---|---|
committer | Moritz Friedrich <moritz@matchory.com> | 2023-01-05 18:33:42 +0100 |
commit | cc7b29d4478975ce22bbdbcfbb64eedea67afdf3 (patch) | |
tree | 8e794562b1f213e4fa3b5a7373796b2cb62d61f7 /example/example-server.d.ts | |
parent | d8a28f55462e16d8968c3ee67c2f4c39ab458182 (diff) |
Add sessions to the example app
Diffstat (limited to 'example/example-server.d.ts')
-rw-r--r-- | example/example-server.d.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/example/example-server.d.ts b/example/example-server.d.ts index 898f090..2e56445 100644 --- a/example/example-server.d.ts +++ b/example/example-server.d.ts @@ -35,5 +35,15 @@ interface LoggedInUser { id: string; username: string; devices: AuthenticatorDevice[]; - currentChallenge?: string; +} + +declare module 'express-session' { + interface SessionData { + /** + * A simple way of storing a user's current challenge being signed by registration or authentication. + * It should be expired after `timeout` milliseconds (optional argument for `generate` methods, + * defaults to 60000ms) + */ + currentChallenge?: string; + } } |