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' { |
||||||
|
/** |
||||||
|
* Extended with passport property. |
||||||
|
*/ |
||||||
|
interface SessionData { |
||||||
passport: { user: string }; |
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 { |
||||||
|
namespace Express { |
||||||
|
/** |
||||||
|
* Extended Express.User object used by express-session and passport to |
||||||
|
* identify which user owns a session. |
||||||
|
*/ |
||||||
|
interface User { |
||||||
name: string; |
name: string; |
||||||
uuid: string; |
uuid: string; |
||||||
}; |
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
export {}; |
||||||
|
Loading…
Reference in new issue