parent
0fa614ca07
commit
448a956313
5 changed files with 38 additions and 18 deletions
@ -1,3 +1,12 @@ |
|||||||
type SessionData = import('express-session').SessionData & { |
declare module 'express-session' { |
||||||
passport: { user: string }; |
/** |
||||||
}; |
* Extended with passport property. |
||||||
|
*/ |
||||||
|
interface SessionData { |
||||||
|
passport: { user: string }; |
||||||
|
returnTo?: string; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Required to avoid overwritting the original express-session module.
|
||||||
|
export {}; |
||||||
|
@ -1,4 +1,14 @@ |
|||||||
type User = Express.User & { |
declare global { |
||||||
name: string; |
namespace Express { |
||||||
uuid: string; |
/** |
||||||
}; |
* Extended Express.User object used by express-session and passport to |
||||||
|
* identify which user owns a session. |
||||||
|
*/ |
||||||
|
interface User { |
||||||
|
name: string; |
||||||
|
uuid: string; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
export {}; |
||||||
|
Loading…
Reference in new issue